import { resolveComponent as ee, openBlock as n, createElementBlock as o, normalizeClass as $, renderSlot as J, createCommentVNode as x, createBlock as ie, useSlots as Se, computed as X, normalizeStyle as Z, createVNode as R, createElementVNode as h, shallowRef as wl, onMounted as De, watch as se, Fragment as Q, renderList as re, resolveDynamicComponent as $l, ref as i, provide as Oe, normalizeProps as Cl, guardReactiveProps as Sl, toDisplayString as A, inject as fe, getCurrentInstance as Ge, unref as G, isRef as ul, withDirectives as Ve, vModelRadio as Vl, onBeforeUnmount as zl, Transition as ml, withCtx as we, vShow as Te, createTextVNode as be, nextTick as oe, watchEffect as Je, reactive as We, onUnmounted as je, withModifiers as ce, vModelText as Ye, defineComponent as Ml, createSlots as gl, createApp as Dl } from "vue";
const Bl = {
  key: 0,
  style: { display: "flex", "align-items": "center", "justify-content": "center" }
}, Ll = /* @__PURE__ */ Object.assign({
  name: "DkButton"
}, {
  __name: "index",
  props: {
    disabled: Boolean,
    rightIcon: Boolean,
    // 通过弹性盒的方向控制图标的位置
    type: {
      type: String,
      default: "primary"
    },
    loading: {
      type: Boolean,
      default: !1
    },
    size: {
      type: String,
      default: "default"
    },
    round: Boolean,
    icon: String,
    circle: Boolean,
    square: Boolean
  },
  setup(e) {
    const s = e;
    return (l, t) => {
      const a = ee("svg-icon");
      return n(), o("button", {
        class: $(["dk-button", [
          s.type ? "dk-button--" + s.type : "",
          s.size ? "dk-button--" + s.size : "",
          s.disabled ? "dk-button--disabled--" + s.type : "",
          s.round ? "dk-button--round--" + s.size : "",
          s.circle ? "dk-button--circle--" + s.size : "",
          s.square ? "dk-button--square--" + s.size : ""
        ]])
      }, [
        l.$slots.icon ? (n(), o("div", Bl, [
          J(l.$slots, "icon")
        ])) : x("", !0),
        !s.rightIcon && s.loading ? (n(), ie(a, {
          key: 1,
          loading: "",
          name: "icon-loading"
        })) : x("", !0),
        !s.rightIcon && !s.loading ? (n(), ie(a, {
          key: 2,
          name: s.icon
        }, null, 8, ["name"])) : x("", !0),
        J(l.$slots, "default"),
        s.rightIcon && s.loading ? (n(), ie(a, {
          key: 3,
          loading: "",
          name: "icon-loading"
        })) : x("", !0),
        s.rightIcon && !s.loading ? (n(), ie(a, {
          key: 4,
          name: s.icon
        }, null, 8, ["name"])) : x("", !0)
      ], 2);
    };
  }
}), Il = {
  key: 0,
  class: "dk-divider__inner-text"
}, Nl = /* @__PURE__ */ Object.assign({
  name: "DkDivider"
}, {
  __name: "index",
  props: {
    dashed: {
      type: Boolean,
      default: !1
    },
    layout: {
      type: String,
      default: "horizontal"
    },
    height: {
      type: Number,
      default: 40
    },
    align: {
      type: String,
      default: "center"
    },
    className: {
      type: String,
      default: null
    }
  },
  setup(e) {
    const l = Se().default !== void 0, t = e, a = X(() => {
      let v = [];
      return t.layout === "horizontal" ? (t.dashed ? v.push("dk-divider--dashed") : v.push("dk-divider--default"), Se() && t.align === "center" ? v.push("dk-divider-width-text-center") : Se() && t.align === "left" ? v.push("dk-divider-width-text-left") : Se() && t.align === "right" && v.push("dk-divider-width-text-right")) : t.layout === "vertical" && (t.dashed ? v.push("dk-divider--vertical_dashed") : v.push("dk-divider--vertical_default")), v;
    });
    return (v, c) => (n(), o("div", {
      class: $([
        "dk-divider",
        a.value,
        t.className ? t.className : null,
        l && t.layout === "horizontal" ? "dk-divider-width-text" : ""
      ]),
      style: Z(t.layout === "vertical" && t.height ? { height: t.height + "px" } : null)
    }, [
      l && t.layout === "horizontal" ? (n(), o("span", Il, [
        J(v.$slots, "default")
      ])) : x("", !0)
    ], 6));
  }
}), Tl = ["href", "target"], Rl = {
  key: 0,
  class: "dk-link__prefix-icon"
}, Al = {
  key: 1,
  class: "dk-link__suffix-icon"
}, Ol = /* @__PURE__ */ Object.assign({
  name: "DkLink"
}, {
  __name: "index",
  props: {
    size: {
      type: String,
      default: ""
    },
    theme: {
      type: String,
      default: "default"
    },
    underline: {
      type: Boolean,
      default: null
    },
    disabled: {
      type: Boolean,
      default: !1
    },
    prefixIconName: {
      type: String,
      default: ""
    },
    suffixIconName: {
      type: String,
      default: ""
    },
    href: {
      type: String,
      default: ""
    },
    target: {
      type: String,
      default: ""
    }
  },
  setup(e) {
    const s = e, l = X(() => {
      const a = ["dk-link"];
      return s.theme === "default" ? a.push("dk-link--theme-default") : s.theme === "primary" ? a.push("dk-link--theme-primary") : s.theme === "danger" ? a.push("dk-link--theme-danger") : s.theme === "warning" ? a.push("dk-link--theme-warning") : s.theme === "success" && a.push("dk-link--theme-success"), s.size === "small" ? a.push("d-size-s") : s.size === "large" && a.push("d-size-l"), s.disabled && a.push("d-is-disabled"), a;
    }), t = X(() => {
      let a = "";
      return s.size === "" ? a = "16px" : s.size === "large" ? a = "18px" : s.size === "small" && (a = "14px"), a;
    });
    return (a, v) => {
      const c = ee("svg-icon");
      return n(), o("a", {
        class: $(l.value),
        href: e.href,
        target: e.target
      }, [
        e.prefixIconName ? (n(), o("span", Rl, [
          R(c, {
            size: t.value,
            name: e.prefixIconName
          }, null, 8, ["size", "name"])
        ])) : x("", !0),
        h("span", {
          class: $([e.underline ? "d-is-underline" : "", e.disabled && e.underline ? "disabled-line" : ""])
        }, [
          J(a.$slots, "default")
        ], 2),
        e.suffixIconName ? (n(), o("span", Al, [
          R(c, { name: e.suffixIconName }, null, 8, ["name"])
        ])) : x("", !0)
      ], 10, Tl);
    };
  }
}), Pl = (e, s) => {
  const l = e[s];
  return l ? typeof l == "function" ? l() : Promise.resolve(l) : new Promise((t, a) => {
    (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, new Error("Unknown variable dynamic import: " + s)));
  });
}, qe = /* @__PURE__ */ Object.assign({
  name: "svgIcon"
}, {
  __name: "index",
  props: {
    name: {
      type: String,
      default: ""
    },
    size: {
      type: String,
      default: "16px"
    },
    color: {
      type: String,
      default: ""
    },
    loading: {
      type: Boolean,
      default: !1
    }
  },
  setup(e) {
    const s = e, l = wl([]);
    De(async () => {
      await t();
    }), se(() => s.name, async () => {
      await t();
    });
    const t = async () => {
      if (!s.name) {
        console.warn("请传递icon名称");
        return;
      }
      const v = [`${s.name}`].map(
        (m) => Pl(/* @__PURE__ */ Object.assign({ "./components/icon-add-circle.vue": () => import("./icon-add-circle-tOeEyinu.js"), "./components/icon-add.vue": () => import("./icon-add-CprZ1vzQ.js"), "./components/icon-arrow-left.vue": () => import("./icon-arrow-left-EXKURoSm.js"), "./components/icon-arrow-right.vue": () => import("./icon-arrow-right-DRcJMV8-.js"), "./components/icon-backtop.vue": () => import("./icon-backtop-DGOyI5m7.js"), "./components/icon-caret-right.vue": () => import("./icon-caret-right-Dn2CA0i4.js"), "./components/icon-check.vue": () => import("./icon-check-7aba3-FR.js"), "./components/icon-chevron-circle-down.vue": () => import("./icon-chevron-circle-down-CYnxg6bo.js"), "./components/icon-chevron-circle-left.vue": () => import("./icon-chevron-circle-left-Cp_Sbnx0.js"), "./components/icon-chevron-circle-right.vue": () => import("./icon-chevron-circle-right-79oCF6uP.js"), "./components/icon-chevron-circle-up.vue": () => import("./icon-chevron-circle-up-CrqniZWH.js"), "./components/icon-chevron-down.vue": () => import("./icon-chevron-down-CV5TkfFo.js"), "./components/icon-chevron-up.vue": () => import("./icon-chevron-up-3XdtO-13.js"), "./components/icon-clear.vue": () => import("./icon-clear-y25skqx9.js"), "./components/icon-close.vue": () => import("./icon-close-BA3uOgrn.js"), "./components/icon-code.vue": () => import("./icon-code-DypFpriu.js"), "./components/icon-date.vue": () => import("./icon-date-ClgKLQPR.js"), "./components/icon-discount-filled.vue": () => import("./icon-discount-filled-mepVBmRY.js"), "./components/icon-discount.vue": () => import("./icon-discount-DNpkPlOV.js"), "./components/icon-down.vue": () => import("./icon-down-Dz52scyT.js"), "./components/icon-ellipsis.vue": () => import("./icon-ellipsis-Cut1wwcx.js"), "./components/icon-error.vue": () => import("./icon-error-D0pm_qN2.js"), "./components/icon-eyes.vue": () => import("./icon-eyes-Aqns0AHR.js"), "./components/icon-filter.vue": () => import("./icon-filter-BoFz9Kdp.js"), "./components/icon-home.vue": () => import("./icon-home-BATWUkK_.js"), "./components/icon-info.vue": () => import("./icon-info-B2G-GTS9.js"), "./components/icon-iseyes.vue": () => import("./icon-iseyes-CY5WRgqA.js"), "./components/icon-jump.vue": () => import("./icon-jump-5fp2Dim5.js"), "./components/icon-layers.vue": () => import("./icon-layers-BsDFtCpv.js"), "./components/icon-link.vue": () => import("./icon-link-B95_cSHn.js"), "./components/icon-loading.vue": () => import("./icon-loading-CN2KQl-o.js"), "./components/icon-menu.vue": () => import("./icon-menu-rCyDZfQ2.js"), "./components/icon-messageclear.vue": () => import("./icon-messageclear-BaUJjTw2.js"), "./components/icon-minus-circle.vue": () => import("./icon-minus-circle-i5CZ_sX1.js"), "./components/icon-minus.vue": () => import("./icon-minus-RY99Z8jW.js"), "./components/icon-password.vue": () => import("./icon-password-Ci-tBL4O.js"), "./components/icon-pen-edit.vue": () => import("./icon-pen-edit-CBU_9chz.js"), "./components/icon-pen.vue": () => import("./icon-pen-Dp3Nb7AZ.js"), "./components/icon-point.vue": () => import("./icon-point-B5ZCC3dK.js"), "./components/icon-question-filled.vue": () => import("./icon-question-filled-Cz21ULr-.js"), "./components/icon-round.vue": () => import("./icon-round-D2PasXl6.js"), "./components/icon-search.vue": () => import("./icon-search-utou1ZDU.js"), "./components/icon-setting.vue": () => import("./icon-setting-DJzqZynm.js"), "./components/icon-success.vue": () => import("./icon-success-0V4-xxa1.js"), "./components/icon-upload.vue": () => import("./icon-upload-DGUGdMqr.js"), "./components/icon-user.vue": () => import("./icon-user-Cc5Mdv7p.js"), "./components/icon-warning.vue": () => import("./icon-warning-V8tPIUqW.js") }), `./components/${m}.vue`).then((d) => d.default)
      ), c = await Promise.all(v);
      l.value = c;
    };
    return (a, v) => (n(!0), o(Q, null, re(l.value, (c, m) => (n(), ie($l(c), {
      key: m,
      size: e.size,
      color: e.color,
      loading: e.loading
    }, null, 8, ["size", "color", "loading"]))), 128));
  }
}), Hl = { class: "dk-checkbox-group" }, Fl = ["value", "disabled", "checked"], El = /* @__PURE__ */ h("span", { class: "dk-checkbox_input" }, null, -1), Wl = { class: "dk-checkbox_label" }, jl = /* @__PURE__ */ Object.assign({
  name: "DkCheckboxGroup"
}, {
  __name: "checkboxGroup",
  props: {
    options: {
      type: Array,
      default: []
    },
    modelValue: {
      type: Array,
      required: !0
    }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: s }) {
    const l = e, t = i(l.modelValue);
    se(
      () => l.modelValue,
      (m) => {
        t.value = m;
      }
    );
    const a = s, v = (m, d) => {
      if (m)
        t.value.push(d);
      else {
        const r = t.value.indexOf(d);
        t.value.splice(r, 1);
      }
      a("update:modelValue", t.value);
    };
    Oe("checkboxGroup", { groupChange: v, checkedOptions: t });
    const c = (m) => {
      const d = m.target.checked, r = m.target._value;
      v(d, r);
    };
    return (m, d) => (n(), o("div", Hl, [
      J(m.$slots, "default", Cl(Sl(m.$attrs))),
      (n(!0), o(Q, null, re(e.options, (r) => (n(), o("label", {
        key: r.value,
        class: $([
          "dk-checkbox",
          t.value.indexOf(r.value) !== -1 ? "dk-box-checked" : "dk-box-default",
          r.disabled ? "dk-box-disabled" : ""
        ])
      }, [
        h("input", {
          type: "checkbox",
          value: r.value,
          disabled: r.disabled,
          checked: t.value.indexOf(r.value) !== -1,
          onChange: c,
          class: "dk-checkbox__former"
        }, null, 40, Fl),
        El,
        h("span", Wl, A(r.label), 1)
      ], 2))), 128))
    ]));
  }
}), Kl = ["checked", "value", "disabled"], Yl = /* @__PURE__ */ h("span", { class: "dk-checkbox_input" }, null, -1), ql = { class: "dk-checkbox_label" }, Ul = /* @__PURE__ */ Object.assign({
  name: "DkCheckbox"
}, {
  __name: "checkbox",
  props: {
    value: {
      type: [Boolean, String, Number, Object, Array],
      default: !1
    },
    onChange: {
      type: Function,
      default: () => {
      }
    },
    checked: {
      type: Boolean,
      default: void 0
    },
    indeterminate: {
      type: Boolean,
      default: void 0
    },
    disabled: {
      type: Boolean,
      default: void 0
    },
    checkedAll: {
      type: Boolean,
      default: void 0
    },
    cModelValue: {
      type: Array
    }
  },
  setup(e) {
    const s = e, l = i(s.checked), t = fe("checkboxGroup");
    Ge();
    const a = i(null);
    De(() => {
      if (t) {
        l.value = t.checkedOptions.value.indexOf(s.value) !== -1;
        let u = a.value;
        Array.from(u.classList).indexOf("dk-checked-all") !== -1 && r(u);
      }
    });
    const v = (u) => {
      const b = u.target.checked;
      let g = u.target.parentNode.parentNode.querySelectorAll(".dk-checked-all")[0];
      g.firstChild.checked = b;
      let _ = Array.from(g.parentNode.children).filter(
        (w) => w !== g && !w.firstChild.disabled
      ), C = [];
      _.forEach((w) => {
        w.firstChild.checked = b, b ? w.classList.add("dk-box-checked") : w.classList.remove("dk-box-checked"), b ? w.classList.remove("dk-box-default") : w.classList.add("dk-box-default"), C.push(w.firstChild._value);
      }), b ? (g.classList.add("dk-box-checked"), g.classList.remove("dk-box-default"), g.classList.remove("dk-is-indeterminate"), t.checkedOptions.value.splice(
        0,
        t.checkedOptions.value.length
      ), t.checkedOptions.value.push(...C), m == null || m.eventType("change", t.checkedOptions.value)) : (g.classList.add("dk-box-default"), g.classList.remove("dk-box-checked"), g.classList.remove("dk-is-indeterminate"), t.checkedOptions.value.splice(0, C.length), m == null || m.eventType("change", t.checkedOptions.value));
    }, c = (u) => {
      const b = s.value, k = u.target.checked;
      if (t) {
        console.log("checked", k);
        let _ = u.target.parentNode.parentNode.querySelectorAll(".dk-checked-all")[0];
        if (k) {
          t.checkedOptions.value.push(b), l.value = !0, m == null || m.eventType("change", t.checkedOptions.value);
          const C = u.target.parentNode;
          C && C.classList.value.indexOf("dk-box-default") !== -1 && (C.classList.add("dk-box-checked"), C.classList.remove("dk-box-default"));
        } else {
          const C = t.checkedOptions.value.indexOf(b);
          t.checkedOptions.value.splice(C, 1), l.value = !1, m == null || m.eventType("change", t.checkedOptions.value);
          const w = u.target.parentNode;
          w && w.classList.value.indexOf("dk-box-checked") !== -1 && (w.classList.remove("dk-box-checked"), w.classList.add("dk-box-default"));
        }
        _ && r(_);
      } else
        s.onChange(k, s.value), l.value = k;
    }, m = fe("formItemEvent"), d = (u) => {
      Array.from(u.target.parentNode.classList).indexOf("dk-checked-all") !== -1 ? v(u) : c(u);
    }, r = (u) => {
      let b = Array.from(u.parentNode.children).filter(
        (_) => _ !== u && !_.firstChild.disabled
      ), k = b.length === t.checkedOptions.value.length, g = b.length > t.checkedOptions.value.length && t.checkedOptions.value.length !== 0;
      k && !g ? (u.classList.remove("dk-box-checked"), u.classList.add("dk-box-checked"), u.classList.remove("dk-is-indeterminate"), u.firstChild.checked = !0) : !k && g ? (u.classList.remove("dk-box-default"), u.classList.remove("dk-box-checked"), u.classList.add("dk-is-indeterminate"), u.firstChild.checked = !1) : (u.classList.add("dk-box-checked"), u.classList.remove("dk-box-checked"), u.classList.remove("dk-is-indeterminate"), u.firstChild.checked = !1, l.value = !1);
    };
    return se(
      () => s.indeterminate,
      (u, b) => {
        !u && s.checked ? l.value = !0 : l.value = !1;
      }
    ), se(
      () => s.checked,
      (u, b) => {
        u ? l.value = !0 : l.value = !1;
      }
    ), se(() => t && t.checkedOptions.value, (u, b) => {
      u.length === 0 && b.length !== 0 && (m == null || m.eventType("change", u), l.value = !1);
    }), (u, b) => (n(), o("label", {
      ref_key: "checkbox",
      ref: a,
      class: $([
        "dk-checkbox",
        e.indeterminate ? "dk-is-indeterminate" : "",
        l.value ? "dk-box-checked" : "dk-box-default",
        e.disabled ? "dk-box-disabled" : "",
        e.checkedAll ? "dk-checked-all" : ""
      ])
    }, [
      h("input", {
        type: "checkbox",
        checked: l.value,
        value: e.value,
        onChange: d,
        disabled: e.disabled,
        class: "dk-checkbox__former"
      }, null, 40, Kl),
      Yl,
      h("span", ql, [
        J(u.$slots, "default")
      ])
    ], 2));
  }
}), Gl = {
  key: 0,
  class: "prependSlots"
}, Jl = ["value", "disabled", "maxlength", "placeholder", "type"], Xl = ["maxlength", "placeholder", "value", "disabled"], Ql = {
  key: 3,
  class: "svg-iconfont"
}, Zl = {
  key: 4,
  class: "svg-iconfont"
}, et = {
  key: 5,
  class: "dk-input__content-limit"
}, lt = {
  key: 1,
  class: "appendSlots"
}, tt = {
  key: 2,
  class: "dk-input__content_textarea-limit"
}, at = {
  key: 3,
  class: "dk-input__content-titleCon"
}, nt = /* @__PURE__ */ Object.assign({
  name: "DkInput"
}, {
  __name: "index",
  props: {
    modelValue: {
      type: String,
      default: ""
    },
    disabled: {
      type: Boolean,
      default: !1
    },
    clearable: {
      type: Boolean,
      default: !1
    },
    showPassword: {
      type: Boolean,
      default: !1
    },
    preIcon: {
      type: String,
      default: null
    },
    titleCon: {
      type: String,
      default: null
    },
    // postIcon: {
    //     type: String,
    //     default: null,
    // },
    type: {
      type: String,
      default: "text"
    },
    size: {
      type: String,
      default: "default"
    },
    placeholder: {
      type: String,
      default: null
    },
    maxlength: {
      type: Number,
      default: null
    },
    autoSize: {
      type: Boolean,
      default: !1
    },
    resize: {
      type: String,
      default: ""
    },
    NoborderType: {
      type: Boolean,
      default: !1
    },
    themeStatus: {
      type: String,
      default: "default"
    }
  },
  emits: ["focus", "blur", "clear", "change", "keydown", "update:modelValue"],
  setup(e, { expose: s, emit: l }) {
    const t = i(), a = i(), v = l, c = (z) => {
      d.NoborderType ? k.value = !0 : b.value = !0, v("focus", z);
    }, m = (z) => {
      b.value = !1, k.value = !1, v("blur", z), r == null || r.eventType("blur", g.value || d.modelValue);
    }, d = e, r = fe("formItemEvent");
    let u = i(!1), b = i(!1), k = i(!1), g = i(""), _ = X(() => d.clearable && !d.disabled && (k.value || b.value || u.value) && (g.value || d.modelValue));
    const C = () => {
      g.value = "", v("keydown", ""), v("update:modelValue", ""), v("change", ""), v("clear");
    };
    let w = i(!1);
    const I = () => {
      w.value = !w.value, H();
    }, H = () => {
      t.value.focus(), setTimeout(() => {
        t.value.setSelectionRange(-1, -1);
      });
    }, L = X(() => String(d.modelValue).length), N = X(() => d.size == "small" ? "14" : d.size == "large" ? "18" : "16"), V = () => {
      d.type == "text" || d.type == "password" ? t.value.focus() : a.value.focus();
    }, f = (z) => {
      g.value = z.target.value, v("update:modelValue", z.target.value), r == null || r.eventType("input", g.value || d.modelValue);
    }, M = (z) => {
      if (g.value = z.target.value, v("update:modelValue", z.target.value), d.autoSize) {
        const D = a.value;
        D.style.height = "auto", D.style.height = `${D.scrollHeight - 8}px`;
      }
    };
    return s({
      focus: H
    }), (z, D) => {
      const y = ee("svg-icon");
      return n(), o("div", {
        class: $(["dk-input", [
          d.size && d.size != "default" ? "dk-input__content--" + d.size : "",
          e.disabled ? "dk-input__content--disabled" : "",
          z.$slots.prepend ? z.$slots.append ? "dk-input__content--pepend" : "dk-input__content--prepend" : z.$slots.append ? "dk-input__content--append" : ""
        ]])
      }, [
        z.$slots.prepend ? (n(), o("div", Gl, [
          J(z.$slots, "prepend")
        ])) : x("", !0),
        h("div", {
          class: $(["dk-input__content", [
            "dk-input__content--" + d.themeStatus,
            G(b) ? "dk-input__content--focus--" + d.themeStatus : "",
            G(k) ? "dk-input__content--focus--noBorder" : "",
            e.type == "textarea" ? "dk-input__content__textarea" : "",
            d.NoborderType ? "dk-input__content--noborder" : ""
          ]]),
          onMouseenter: D[4] || (D[4] = (S) => ul(u) ? u.value = !0 : u = !0),
          onMouseleave: D[5] || (D[5] = (S) => ul(u) ? u.value = !1 : u = !1),
          onClick: V
        }, [
          e.preIcon || z.$slots.prefix_icon ? (n(), o("div", {
            key: 0,
            class: $(["preIcon-svg-iconfont", G(b) ? "dk-input--icon--" + d.themeStatus : ""])
          }, [
            R(y, {
              size: N.value,
              name: e.preIcon
            }, null, 8, ["size", "name"]),
            J(z.$slots, "prefix_icon")
          ], 2)) : x("", !0),
          e.type !== "textarea" ? (n(), o("input", {
            key: 1,
            ref_key: "input",
            ref: t,
            value: e.modelValue,
            disabled: e.disabled,
            maxlength: e.maxlength,
            placeholder: d.placeholder,
            type: e.showPassword ? G(w) ? "text" : "password" : e.type,
            onInput: f,
            onFocus: c,
            onBlur: m,
            onChange: D[0] || (D[0] = (S) => v("change", S.target.value)),
            onKeydown: D[1] || (D[1] = (S) => v("keydown", S))
          }, null, 40, Jl)) : (n(), o("textarea", {
            key: 2,
            ref_key: "textarea",
            ref: a,
            class: $(e.resize == "none" ? "textareaResize" : ""),
            style: Z(d.autoSize ? "overflow:hidden" : ""),
            maxlength: e.maxlength,
            placeholder: d.placeholder,
            value: e.modelValue,
            disabled: e.disabled,
            onInput: M,
            onFocus: c,
            onBlur: m,
            onChange: D[2] || (D[2] = (S) => v("change", S.target.value)),
            onKeydown: D[3] || (D[3] = (S) => v("keydown", S))
          }, null, 46, Xl)),
          G(_) ? (n(), o("div", Ql, [
            h("div", { onClick: C }, [
              R(y, {
                size: N.value,
                name: "icon-clear"
              }, null, 8, ["size"])
            ])
          ])) : x("", !0),
          e.showPassword ? (n(), o("div", Zl, [
            G(w) ? x("", !0) : (n(), o("div", {
              key: 0,
              onClick: I
            }, [
              R(y, {
                size: N.value,
                name: "icon-iseyes"
              }, null, 8, ["size"])
            ])),
            G(w) ? (n(), o("div", {
              key: 1,
              onClick: I
            }, [
              R(y, {
                size: N.value,
                name: "icon-eyes"
              }, null, 8, ["size"])
            ])) : x("", !0)
          ])) : x("", !0),
          d.type == "text" && e.maxlength ? (n(), o("div", et, A(L.value) + "/" + A(e.maxlength), 1)) : x("", !0)
        ], 34),
        z.$slots.append ? (n(), o("div", lt, [
          J(z.$slots, "append")
        ])) : x("", !0),
        d.type == "textarea" && e.maxlength ? (n(), o("div", tt, A(L.value) + "/" + A(e.maxlength), 1)) : x("", !0),
        d.titleCon ? (n(), o("div", at, A(d.titleCon), 1)) : x("", !0)
      ], 2);
    };
  }
}), st = ["value", "checked", "disabled"], ot = /* @__PURE__ */ h("span", { class: "dk-radio__input" }, null, -1), it = { class: "dk-radio__label" }, ut = /* @__PURE__ */ Object.assign({
  name: "DkRadio"
}, {
  __name: "radio",
  props: {
    value: {
      type: [String, Boolean, Number],
      default: void 0
    },
    modelValue: {
      type: String,
      default: void 0
    },
    checked: {
      type: Boolean,
      default: void 0
    },
    disabled: {
      type: Boolean,
      default: void 0
    },
    onChange: {
      type: Function,
      default: () => {
      }
    },
    allowUncheck: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: s }) {
    const l = e;
    De(() => {
      t ? c.value = t.checkedValue.value === l.value : c.value = l.value === l.modelValue;
    });
    const t = fe("radioGroup"), a = s, v = i(l.modelValue), c = i(l.checked), m = (k) => {
      if (t) {
        let g = k.target.parentNode;
        g.classList.add("dk-is-checked"), g.firstChild.checked = !0, Array.from(g.parentNode.children).filter(
          (C) => C !== g
        ).forEach((C) => {
          C.classList.remove("dk-is-checked"), C.firstChild.checked = !1;
        });
      } else {
        const g = k.target.checked;
        c.value = g;
      }
    }, d = i(null), r = i(!1), u = (k) => {
      if (r.value = !0, d.value = k, t) {
        let g = k.target.parentNode;
        t.allowUncheck.value ? k.target._value === t.checkedValue.value ? (g.classList.remove("dk-is-checked"), g.firstChild.checked = !1, t.groppChange(void 0, k)) : (g.classList.add("dk-is-checked"), g.firstChild.checked = !0, t.groppChange(k.target._value, k)) : k.target._value !== t.checkedValue.value && (g.firstChild.checked = !0, t.groppChange(k.target._value, k));
      }
      l.allowUncheck && (c.value === k.target.checked ? (c.value = !1, a("update:modelValue", void 0)) : (c.value = k.target.checked, a("update:modelValue", k.target._value)), l.onChange(c.value, k));
    }, b = fe("formItemEvent");
    return se(() => t && t.modValue.value, (k, g) => {
      if (k === void 0) {
        let _ = d.value;
        if (_) {
          let C = _.target.parentNode;
          C.classList.remove("dk-is-checked"), C.firstChild.checked = !1, c.value = !1;
        }
        r.value = !1;
      } else
        l.value === k ? (c.value = !0, r.value || t.groppChange(k, void 0), b == null || b.eventType("change", k)) : (c.value = !1, r.value = !1), r.value = !1;
    }), (k, g) => (n(), o("label", {
      class: $([
        "dk-radio",
        c.value ? "dk-is-checked" : "",
        e.disabled ? "dk-is-disabled" : ""
      ])
    }, [
      Ve(h("input", {
        type: "radio",
        class: "dk-radio__former",
        value: e.value,
        checked: c.value,
        disabled: e.disabled,
        "onUpdate:modelValue": g[0] || (g[0] = (_) => v.value = _),
        onChange: m,
        onClick: u
      }, null, 40, st), [
        [Vl, v.value]
      ]),
      ot,
      h("span", it, [
        J(k.$slots, "default")
      ])
    ], 2));
  }
}), dt = { class: "dk-radio-group" }, ct = ["checked", "value", "disabled"], rt = /* @__PURE__ */ h("span", { class: "dk-radio__input" }, null, -1), vt = { class: "dk-radio__label" }, ft = /* @__PURE__ */ Object.assign({
  name: "DkRadioGroup"
}, {
  __name: "radioGroup",
  props: {
    modelValue: {
      type: String,
      default: void 0
    },
    allowUncheck: {
      type: Boolean,
      default: !1
    },
    options: {
      type: Array,
      default: []
    },
    onChange: {
      type: Function,
      default: () => {
      }
    },
    variant: {
      type: String,
      default: "outline"
    },
    size: {
      type: String,
      default: "medium"
    }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: s }) {
    const l = e, t = s, a = i();
    let v = i(l.modelValue);
    const c = (k, g) => {
      v.value = k, t("update:modelValue", k), l.onChange(k, g);
    }, m = i(l.allowUncheck), d = i(l.variant), r = i(l.size), u = i(l.modelValue);
    Oe("radioGroup", {
      groupChecked: a,
      groppChange: c,
      allowUncheck: m,
      checkedValue: v,
      currentVariant: d,
      currentSize: r,
      modValue: u
    }), se(
      () => l.modelValue,
      (k) => {
        u.value = k;
      }
    );
    const b = (k) => {
      let g = k.target.parentNode;
      k.target._value === u.value && l.allowUncheck ? (g.classList.remove("dk-is-checked"), g.firstChild.checked = !1, t("update:modelValue", void 0), l.onChange(void 0, k)) : (g.classList.add("dk-is-checked"), g.firstChild.checked = !0, Array.from(g.parentNode.children).filter(
        (C) => C !== g
      ).forEach((C) => {
        C.classList.remove("dk-is-checked"), C.firstChild.checked = !1;
      }), t("update:modelValue", k.target._value), l.onChange(k.target._value, k));
    };
    return (k, g) => (n(), o("div", dt, [
      J(k.$slots, "default"),
      (n(!0), o(Q, null, re(e.options, (_, C) => (n(), o("label", {
        key: C,
        class: $([
          "dk-radio",
          u.value === _.value ? "dk-is-checked" : "",
          _.disabled ? "dk-is-disabled" : ""
        ])
      }, [
        h("input", {
          type: "radio",
          class: "dk-radio__former",
          checked: u.value === _.value,
          value: _.value,
          disabled: _.disabled,
          onChange: g[0] || (g[0] = (...w) => k.handleChange && k.handleChange(...w)),
          onClick: b
        }, null, 40, ct),
        rt,
        h("span", vt, A(_.label), 1)
      ], 2))), 128))
    ]));
  }
}), ht = ["value", "disabled"], pt = /* @__PURE__ */ h("span", { class: "dk-radio-button__input" }, null, -1), mt = { class: "dk-radio-button__label" }, gt = /* @__PURE__ */ Object.assign({
  name: "DkRadioButton"
}, {
  __name: "radioButton",
  props: {
    value: {
      type: [String, Boolean, Number],
      default: void 0
    },
    disabled: {
      type: Boolean,
      default: void 0
    }
  },
  setup(e) {
    const s = e, l = fe("radioGroup"), t = i(null), a = i();
    De(() => {
      const d = t.value.parentNode;
      let r = `t-radio-group__${l.currentVariant.value}`, u = `t-radio-button-${l.currentSize.value}`;
      Array.from(d.classList).indexOf(r) === -1 && (d.classList.add(r), d.classList.add(u)), a.value = l.checkedValue.value === s.value;
    });
    const v = (d) => {
    }, c = (d) => {
      let r = d.target.parentNode;
      d.target._value !== l.checkedValue.value && (r.firstChild.checked = !0, a.value = !0, r.classList.add("d-radio-button--checked"), Array.from(r.parentNode.children).filter(
        (b) => b !== r
      ).forEach((b) => {
        b.classList.remove("d-radio-button--checked"), b.firstChild.checked = !1;
      }), l.groppChange(d.target._value, d));
    }, m = fe("formItemEvent");
    return se(() => l.modValue.value, (d, r) => {
      d === void 0 ? a.value = !1 : m == null || m.eventType("change", d);
    }), (d, r) => (n(), o("label", {
      ref_key: "radioButton",
      ref: t,
      class: $([
        "dk-radio-button",
        a.value ? "d-radio-button--checked" : "",
        e.disabled ? "dk-radio-button-disabled" : ""
      ])
    }, [
      h("input", {
        type: "radio",
        value: e.value,
        disabled: e.disabled,
        class: "dk-radio-button__former",
        onClick: c,
        onChange: v
      }, null, 40, ht),
      pt,
      h("span", mt, [
        J(d.$slots, "default")
      ])
    ], 2));
  }
}), kt = {
  key: 0,
  style: { "font-size": "12px", "line-height": "20px" }
}, yt = /* @__PURE__ */ Object.assign({
  name: "DkBacktop"
}, {
  __name: "index",
  props: {
    defaultVisible: {
      type: Boolean,
      default: !1
    },
    // 距离顶部多远出现按钮
    visibilityHeight: {
      type: Number,
      default: 100
    },
    // 返回顶部后离顶部的距离
    backPosition: {
      type: Number,
      default: 0
    },
    customStyle: {
      type: Object,
      default: function() {
        return {
          right: "24px",
          bottom: "80px"
        };
      }
    },
    transitionName: {
      type: String,
      default: "fade"
    },
    title: {
      type: Boolean,
      default: !0
    },
    type: {
      type: String,
      default: ""
    },
    sizeType: {
      type: String,
      default: "medium"
    },
    shape: {
      type: String,
      default: "square"
    }
  },
  setup(e) {
    const s = i(!1), l = i(null), t = i(!1), a = e;
    De(() => {
      window.addEventListener("scroll", v), a.defaultVisible && (s.value = !0);
    }), zl(() => {
      window.removeEventListener("scroll", v), l.value && clearInterval(l.value);
    });
    const v = () => {
      a.defaultVisible || (s.value = window.pageYOffset > a.visibilityHeight);
    }, c = () => {
      if (t.value)
        return;
      const d = window.pageYOffset;
      let r = 0;
      t.value = !0, l.value = setInterval(() => {
        const u = Math.floor(m(10 * r, d, -d, 500));
        u <= a.backPosition ? (window.scrollTo(0, a.backPosition), clearInterval(l.value), t.value = !1) : window.scrollTo(0, u), r++;
      }, 16.7);
    }, m = (d, r, u, b) => (d /= b / 2) < 1 ? u / 2 * d * d + r : -u / 2 * (--d * (d - 2) - 1) + r;
    return (d, r) => {
      const u = ee("svg-icon");
      return n(), ie(ml, { name: e.transitionName }, {
        default: we(() => [
          Ve(h("div", {
            style: Z(e.customStyle),
            class: $(["back-to-ceiling", [
              a.type == "primary" ? "back-to-ceiling-primary" : "",
              a.type == "dark" ? "back-to-ceiling-dark" : "",
              a.sizeType == "small" ? "back-to-ceiling-small" : "",
              a.shape == "circle" ? "back-to-ceiling-circle" : ""
            ]]),
            onClick: c
          }, [
            R(u, {
              size: "24px",
              name: "icon-backtop"
            }),
            e.title && a.sizeType != "small" ? (n(), o("span", kt, "TOP")) : x("", !0)
          ], 6), [
            [Te, s.value]
          ])
        ]),
        _: 1
      }, 8, ["name"]);
    };
  }
}), bt = { class: "dk-tooltip-max-width" }, _t = /* @__PURE__ */ Object.assign({
  name: "DkTooltip"
}, {
  __name: "index",
  props: {
    // tooltip的内容
    title: {
      default: "",
      type: String
    },
    // tooltip的触发方式 hover click
    trigger: {
      default: "hover",
      type: String
    },
    // 可以用来手动控制tooltip的出现或者消失
    visible: {
      default: void 0,
      type: Boolean
    },
    // tooltip出现的位置
    position: {
      default: "topLeft",
      type: String
    },
    // 可以设置tooltip的背景颜色
    background: {
      default: "",
      type: String
    },
    disabled: {
      default: !1,
      type: Boolean
    },
    // 自定义tooltip的宽度,tooltip的宽度受被包裹元素的影响，这里提供自定义
    width: {
      default: "",
      type: String
    },
    type: {
      default: "default",
      type: String
    },
    arrow: {
      default: !0,
      type: Boolean
    },
    visibleMouse: {
      default: !1,
      type: Boolean
    }
  },
  setup(e) {
    const s = e;
    se(s.visible, (r) => {
      emit("change", r);
    });
    let l = i(!1);
    s.visible !== void 0 && (l = i(!0));
    const t = Ge(), a = i(null), v = (r) => {
      if (s.visibleMouse && a.value && s.trigger === "hover" && s.visible === void 0) {
        l.value = !0;
        const u = a.value;
        u.style.position = "fixed", u.style.bottom = "auto", u.style.top = r.clientY + 18 + "px", u.style.left = r.clientX + "px";
      }
    }, c = () => {
      !s.visibleMouse && s.trigger === "hover" && s.visible === void 0 && (l.value = !0);
    }, m = () => {
      s.trigger === "hover" && s.visible === void 0 && (l.value = !1);
    }, d = () => {
      if (s.trigger === "click" && s.visible === void 0 && (l.value = !l.value, s.visibleMouse && a.value)) {
        const r = a.value;
        r.style.position = "fixed", r.style.bottom = "auto", r.style.top = event.clientY + 18 + "px", r.style.left = event.clientX + "px";
      }
    };
    return se(l, (r) => {
      t == null || t.emit("change", r);
    }), (r, u) => (n(), o("div", {
      onMousemove: v,
      onMouseenter: c,
      onMouseleave: m,
      onClick: d,
      class: $(["dk-tooltip-warpper", s.visibleMouse ? `trigger-${e.trigger}` : `trigger-${e.trigger} position-${e.position}`])
    }, [
      Ve(h("div", bt, [
        Ve(h("div", {
          ref_key: "dk_tooltip_mouse",
          ref: a,
          class: $(["dk-tooltip-content-warpper", [
            s.type ? "dk-tooltip-content-warpper-" + s.type : ""
          ]]),
          style: Z(
            e.background ? { background: e.background, color: "#fff", borderColor: e.background, width: e.width } : { width: e.width }
          )
        }, [
          be(A(e.title) + " ", 1),
          s.arrow && !s.visibleMouse ? (n(), o("div", {
            key: 0,
            class: $(["tooltip-icon", [
              s.type ? "dk-tooltip-content-warpper-" + s.type : ""
            ]]),
            style: Z(e.background ? { background: e.background, color: "#fff", borderColor: e.background } : {})
          }, null, 6)) : x("", !0)
        ], 6), [
          [Te, !e.disabled && G(l)]
        ])
      ], 512), [
        [Te, e.visible !== void 0 ? e.visible : !0]
      ]),
      J(r.$slots, "default")
    ], 34));
  }
});
function xt(e) {
  return new Promise((s, l) => {
    const t = document.createElement("canvas"), a = window.devicePixelRatio || 1, c = e.fontContent.fontSize * a + "px serif", m = t.getContext("2d"), d = {
      height: e.height + e.gap * a,
      width: e.width + e.gap * a
    };
    t.width = d.width, t.height = d.height;
    const r = () => {
      if (e.imgContent.url !== "") {
        const g = new Image();
        g.src = e.imgContent.url, g.onload = () => {
          m.drawImage(g, 0, 0, e.imgContent.width, e.imgContent.height), e.imgContent.isGrayscale && u(), b(e.imgContent.width + 8, e.imgContent.height), k();
        };
      } else
        b(0, 0), k();
    }, u = () => {
      const g = m.getImageData(0, 0, t.width, t.height), _ = g.data;
      for (let C = 0; C < _.length; C += 4) {
        const w = _[C], I = _[C + 1], H = _[C + 2], L = (w + I + H) / 3;
        _[C] = L, _[C + 1] = L, _[C + 2] = L;
      }
      m.putImageData(g, 0, 0);
    }, b = (g, _) => {
      m.fillStyle = e.fontContent.fontColor, m.font = c, m.textAlign = "left", m.textBaseline = "middle", m.fillText(e.text, g, _ / 2);
    }, k = () => {
      let g = {
        base64: t.toDataURL(),
        size: d,
        styleSize: {
          height: d.height / a,
          width: d.width / a
        }
      };
      s(g);
    };
    oe(() => {
      m.translate(t.width / 2, t.height / 2), m.rotate(Math.PI / 180 * -e.rotate), r();
    });
  });
}
const wt = /* @__PURE__ */ Object.assign({
  name: "DkWaterMark"
}, {
  __name: "index",
  props: {
    refName: {
      type: String,
      default: "watermark"
    },
    text: {
      type: String,
      required: !0,
      default: "文字水印"
    },
    imgContent: {
      type: Object,
      default: {
        url: "",
        height: 24,
        width: 24,
        isGrayscale: !1
      }
    },
    fontContent: {
      type: Object,
      default: {
        fontSize: 24,
        fontColor: "rgba(0,0,0,0.1)"
      }
    },
    width: {
      type: Number,
      default: 100
    },
    height: {
      type: Number,
      default: 50
    },
    gap: {
      type: Number,
      default: 0
    },
    rotate: {
      type: Number,
      default: 30
    }
  },
  setup(e) {
    const s = e, l = Ge(), t = async () => {
      const a = await xt(s), { base64: v, styleSize: c } = a;
      let m = document.getElementsByClassName(s.refName)[0];
      m && m.parentNode.removeChild(m);
      let d = document.createElement("div");
      d.classList.add(s.refName), d.style.backgroundImage = `url(${v})`, d.style.backgroundSize = `${c.width}px ${c.height}px`, d.style.backgroundRepeat = "repeat", d.style.zIndex = 9999, d.style.position = "absolute", d.style.inset = 0, l.refs[s.refName].appendChild(d);
    };
    return Je(async () => {
      await t();
    }), (a, v) => (n(), o("div", {
      class: "dk-watermark",
      style: { position: "relative", overflow: "hidden", width: "100%" },
      ref: e.refName
    }, [
      J(a.$slots, "default")
    ], 512));
  }
}), $t = {
  key: 1,
  style: { padding: "0 3px" }
}, Ct = {
  key: 1,
  style: { padding: "0 3px" }
}, St = /* @__PURE__ */ Object.assign({
  name: "DkSwitch"
}, {
  __name: "index",
  props: {
    modelValue: {
      type: Boolean,
      default: !1
    },
    size: {
      type: String,
      default: "medium"
    },
    label: {
      type: Array,
      default: null
    },
    disabled: {
      type: Boolean,
      default: void 0
    },
    loading: {
      type: Boolean,
      default: void 0
    }
  },
  emits: ["update:modelValue", "change"],
  setup(e, { emit: s }) {
    const l = e, t = i(!1), a = i(l.label);
    De(() => {
      t.value = !!l.modelValue;
    });
    const v = () => {
      l.disabled || l.loading || (t.value = !t.value, c("change", t.value));
    }, c = s;
    se(t, (d) => {
      c("update:modelValue", d);
    });
    const m = X(() => l.loading === "small" ? 12 : l.loading === "medium" ? 14 : 16);
    return se(() => l.modelValue, (d) => {
      t.value = d;
    }), (d, r) => {
      const u = ee("svg-icon");
      return n(), o("div", {
        class: $(["dk-switch", [
          t.value ? "dk-switch--on" : "",
          `dk-switch--${e.size}`,
          a.value && a.value.length > 1 ? "dk-switch--desc" : "",
          e.disabled || e.loading ? "dk-switch-disabled" : ""
        ]]),
        onClick: v
      }, [
        !e.loading && a.value && a.value.length > 1 && t.value ? (n(), o("span", {
          key: 0,
          class: $([`dk-switch-label-on--${e.size}`, "dk-switch-label"])
        }, [
          a.value[0].indexOf("icon") !== -1 ? (n(), ie(u, {
            key: 0,
            size: "16px",
            color: "#FFFFFFE5",
            name: a.value[0]
          }, null, 8, ["name"])) : (n(), o("span", $t, A(a.value[0]), 1))
        ], 2)) : x("", !0),
        h("div", {
          class: $(["dk-switch__core", e.loading ? "dk-switch__loading" : ""])
        }, [
          e.loading ? (n(), ie(u, {
            key: 0,
            name: "icon-loading",
            loading: e.loading,
            size: m.value,
            color: "rgba(30, 117, 254, 1)"
          }, null, 8, ["loading", "size"])) : x("", !0)
        ], 2),
        !e.loading && a.value && a.value.length > 1 && !t.value ? (n(), o("span", {
          key: 1,
          class: $([`dk-switch-label-off--${e.size}`, "dk-switch-label"])
        }, [
          a.value[1].indexOf("icon") !== -1 ? (n(), ie(u, {
            key: 0,
            size: "16px",
            color: "#FFFFFFE5",
            name: a.value[1]
          }, null, 8, ["name"])) : (n(), o("span", Ct, A(a.value[1]), 1))
        ], 2)) : x("", !0)
      ], 2);
    };
  }
}), Vt = { class: "dk-progress" }, zt = { class: "dk-progress__bar" }, Mt = ["viewBox"], Dt = ["stroke-dashoffset", "cx", "cy", "r"], Bt = ["stroke-dashoffset", "cx", "cy", "r"], Lt = {
  key: 0,
  class: "progress-label"
}, It = {
  key: 1,
  class: "progress-label"
}, Nt = {
  key: 2,
  class: "progress-label"
}, Tt = {
  key: 3,
  class: "progress-label"
}, Rt = { key: 0 }, At = /* @__PURE__ */ Object.assign({
  name: "DkProgress"
}, {
  __name: "index",
  props: {
    theme: {
      // 'line' | 'plump' | 'circle'
      type: String,
      default: "line"
    },
    status: {
      // 'success' | 'error' | 'warning' | 'active'
      type: String,
      default: "active"
    },
    size: {
      type: String,
      // small/medium/large/
      default: "medium"
    },
    percentage: {
      type: Number,
      default: 0
    },
    maxValue: {
      type: Number,
      default: 100
    },
    iconSize: {
      type: String,
      default: "32px"
    }
  },
  setup(e) {
    const s = e, l = X(() => {
      const u = v.value - a.value;
      return 2 * Math.PI * u;
    }), t = X(() => {
      const u = s.percentage, b = s.maxValue, k = u / b;
      return l.value * (1 - k);
    }), a = X(() => {
      const u = s.size;
      if (s.theme === "circle")
        return u === "small" ? 4 : u === "medium" ? 6 : 8;
    }), v = X(() => {
      const u = s.size;
      if (s.theme === "circle")
        return u === "small" ? 36 : u === "medium" ? 56 : u === "large" ? 80 : u;
    }), c = i();
    c.value = `0 0 ${v.value * 2} ${v.value * 2}`;
    const m = i(), d = i(), r = X(() => {
      var u, b, k;
      return s.percentage <= 10 ? ((u = d.value) == null ? void 0 : u.offsetWidth) + 10 : ((b = d.value) == null ? void 0 : b.offsetWidth) - ((k = m.value) == null ? void 0 : k.offsetWidth) - 8;
    });
    return (u, b) => {
      const k = ee("svg-icon");
      return n(), o("div", Vt, [
        h("div", {
          class: $([
            `dk-progress--${e.theme}`,
            e.theme === "plump" && e.status === "active" ? `dk-progress-gap-${e.theme}` : "",
            e.theme === "circle" ? `dk-progress--${e.size}` : ""
          ])
        }, [
          h("div", zt, [
            e.theme !== "circle" ? (n(), o("div", {
              key: 0,
              ref_key: "active_inner",
              ref: d,
              class: $(["dk-progress__inner", `dk-progress__inner--${e.status}`]),
              style: Z({ width: `${e.percentage}%` })
            }, null, 6)) : x("", !0),
            e.theme === "circle" ? (n(), o("div", {
              key: 1,
              class: $(["progress-ring--circle", `dk-progress__inner--${e.status}`])
            }, [
              (n(), o("svg", {
                class: "progress-ring",
                ref: "ringBox",
                viewBox: c.value,
                style: Z({ height: v.value * 2, width: v.value * 2 })
              }, [
                h("circle", {
                  class: "progress-circle progress-background_n",
                  "stroke-dashoffset": l.value,
                  style: Z({ strokeWidth: a.value }),
                  cx: v.value,
                  cy: v.value,
                  r: v.value - a.value
                }, null, 12, Dt),
                h("circle", {
                  class: "progress-circle progress-background_r",
                  "stroke-dashoffset": t.value,
                  style: Z({ strokeDasharray: l.value, strokeWidth: a.value }),
                  cx: v.value,
                  cy: v.value,
                  r: v.value - a.value
                }, null, 12, Bt)
              ], 12, Mt)),
              e.status === "active" && e.theme === "circle" ? (n(), o("div", Lt, [
                h("span", {
                  class: $(["circle-progress-text", `circle-progress-text-${e.size}`])
                }, A(e.percentage) + "%", 3)
              ])) : x("", !0),
              e.status === "success" && e.theme === "circle" ? (n(), o("div", It, [
                R(k, {
                  size: e.iconSize,
                  color: "#00B87A",
                  name: "icon-check"
                }, null, 8, ["size"])
              ])) : x("", !0),
              e.status === "warning" && e.theme === "circle" ? (n(), o("div", Nt, [
                R(k, {
                  size: e.iconSize,
                  color: "#FF9900",
                  name: "icon-point"
                }, null, 8, ["size"])
              ])) : x("", !0),
              e.status === "error" && e.theme === "circle" ? (n(), o("div", Tt, [
                R(k, {
                  size: e.iconSize,
                  color: "#E34D59",
                  name: "icon-close"
                }, null, 8, ["size"])
              ])) : x("", !0)
            ], 2)) : x("", !0)
          ]),
          e.theme !== "circle" ? (n(), o("div", {
            key: 0,
            class: "dk-progress__text",
            style: Z({ left: `${r.value}px` })
          }, [
            e.status === "active" && (e.theme === "line" || e.theme === "plump") ? (n(), o(Q, { key: 0 }, [
              e.theme === "line" ? (n(), o("span", Rt, A(e.percentage) + "%", 1)) : (n(), o("span", {
                key: 1,
                ref_key: "text_inner",
                ref: m,
                class: $([e.theme === "plump" && e.percentage > 10 ? "progress-wight_style" : "progress-black_style"])
              }, A(e.percentage) + "%", 3))
            ], 64)) : x("", !0),
            e.status === "success" ? (n(), o("span", {
              key: 1,
              class: $([`dk-progress-icon--${e.status}`])
            }, [
              R(k, {
                size: "16px",
                color: "#FFFFFFE5",
                name: "icon-check"
              })
            ], 2)) : x("", !0),
            e.status === "error" ? (n(), o("span", {
              key: 2,
              class: $([`dk-progress-icon--${e.status}`])
            }, [
              R(k, {
                size: "16px",
                color: "#FFFFFFE5",
                name: "icon-close"
              })
            ], 2)) : x("", !0),
            e.status === "warning" ? (n(), o("span", {
              key: 3,
              class: $([`dk-progress-icon--${e.status}`])
            }, [
              R(k, {
                size: "16px",
                color: "#FFFFFFE5",
                name: "icon-point"
              })
            ], 2)) : x("", !0)
          ], 4)) : x("", !0)
        ], 2)
      ]);
    };
  }
}), Ot = { class: "dk-loading" }, Pt = /* @__PURE__ */ Object.assign({
  name: "DkLoading"
}, {
  __name: "index",
  props: {
    text: {
      type: String,
      default: ""
    },
    indicator: {
      type: Boolean,
      default: !0
    },
    size: {
      type: String,
      // small/medium/large/
      default: "small"
    },
    loading: {
      type: Boolean,
      default: !1
    }
  },
  setup(e) {
    const s = e, l = X(() => {
      switch (s.size) {
        case "small":
          return 12;
        case "medium":
          return 14;
        case "large":
          return 16;
        default:
          return 12;
      }
    }), t = X(() => {
      switch (s.size) {
        case "small":
          return 16;
        case "medium":
          return 32;
        case "large":
          return 56;
        default:
          return 16;
      }
    }), a = X(() => {
      if (!(s.text === "" || !s.indicator))
        switch (s.size) {
          case "small":
            return 4;
          case "medium":
            return 8;
          case "large":
            return 12;
          default:
            return 4;
        }
    });
    return (v, c) => {
      const m = ee("svg-icon");
      return n(), o("div", Ot, [
        h("div", {
          class: $([e.loading ? "dk-loading__content" : ""])
        }, [
          J(v.$slots, "default")
        ], 2),
        e.loading ? (n(), o("div", {
          key: 0,
          class: "dk-loading--center",
          style: Z({ gap: `${a.value}px` })
        }, [
          e.indicator ? (n(), ie(m, {
            key: 0,
            name: "icon-loading",
            loading: e.loading,
            size: `${t.value}px`,
            color: "rgba(30, 117, 254, 1)"
          }, null, 8, ["loading", "size"])) : x("", !0),
          e.text !== "" ? (n(), o("span", {
            key: 1,
            style: Z({ "font-size": `${l.value}px` }),
            ref: "loadingTextRef",
            class: "dk-loading__text"
          }, A(e.text), 5)) : x("", !0)
        ], 4)) : x("", !0)
      ]);
    };
  }
}), Ht = {
  key: 0,
  class: "dk-pagination__total"
}, Ft = {
  key: 1,
  class: /* @__PURE__ */ $(["dk-pagination__select"])
}, Et = ["onMousedown"], Wt = {
  key: 3,
  class: "dk-pagination__pager"
}, jt = ["onClick"], Kt = /* @__PURE__ */ h("span", { class: "dk-pagination__jump-text" }, " 跳至 ", -1), Yt = { class: "dk-pagination__jump-text" }, qt = { class: "dk-pagination__jump-total" }, Ut = /* @__PURE__ */ Object.assign({
  name: "DkPagination"
}, {
  __name: "index",
  props: {
    showPageSize: {
      type: Boolean,
      default: !0
    },
    total: {
      type: Number,
      default: 0
    },
    pageSize: {
      type: Number,
      default: 10
    },
    currentPage: {
      type: Number,
      default: 1
    },
    pageSizeOptions: {
      type: Array,
      default: () => [10, 20, 30, 40, 50]
    },
    onPageSizeChange: {
      type: Function,
      default: () => {
      }
    },
    onPageNumberChange: {
      type: Function,
      default: () => {
      }
    },
    showJumper: {
      type: Boolean,
      default: !1
    },
    showPageNumber: {
      type: Boolean,
      default: !0
    },
    size: {
      type: String,
      default: "normal"
    },
    showTotalNumber: {
      type: Boolean,
      default: !0
    },
    disabled: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["update:currentPage", "update:pageSize"],
  setup(e, { emit: s }) {
    const l = s, t = e, a = i([]), v = (y) => {
      const S = [];
      for (let T = 1; T <= Math.ceil(t.total / y); T++)
        S.push(T);
      a.value = S.length > 0 ? S : [1], c.value > a.value[a.value.length - 1] && (c.value = a.value[a.value.length - 1]), b();
    };
    De(() => {
      v(t.pageSize);
    });
    const c = i(t.currentPage);
    se(() => c.value, (y, S) => {
      t.onPageNumberChange(y), f.value = c.value;
    });
    const m = (y, S) => {
      t.disabled || (y !== "..." ? (c.value = y, b()) : S === 1 ? (c.value = c.value > 5 ? c.value - 5 : c.value - 3, b()) : (c.value = c.value + 5 > u.data[u.data.length - 1] ? u.data[u.data.length - 1] : c.value + 5, b()));
    }, d = () => {
      t.disabled || c.value > 1 && (c.value--, b());
    }, r = () => {
      t.disabled || c.value < u.data[u.data.length - 1] && (c.value++, b());
    }, u = We({
      data: []
    }), b = () => {
      let y = [...a.value], S = [];
      y.length > 10 && c.value < 5 ? S = [...y.splice(0, 5), "...", y[y.length - 1]] : y.length > 10 && c.value >= 5 ? c.value > y[y.length - 1] - 4 ? S = [1, "...", ...[...a.value].slice(-5)] : S = [1, "...", ...k(y, c.value, 2, 3), "...", y[y.length - 1]] : y.length <= 10 && (S = [...y]), u.data = S;
    }, k = (y, S, T, $e) => {
      const U = y.indexOf(S * 1), xe = Math.max(0, U - T), _e = Math.min(U + $e, y.length);
      return y.slice(xe, _e);
    }, g = i();
    g.value = `${t.pageSize} 条/页`;
    const _ = (y) => {
      g.value.indexOf(y) === -1 && (g.value = `${y} 条/页`, l("update:pageSize", y), t.onPageSizeChange(y), C.value = !1, v(y));
    }, C = i(!1), w = i(null), I = i(null), H = () => {
      t.disabled || (C.value = !0, oe(() => {
        N();
      }));
    }, L = () => {
      C.value = !1;
    }, N = () => {
      const y = w.value.offsetHeight, S = I.value.offsetHeight;
      window.innerHeight - I.value.getBoundingClientRect().bottom >= y ? (w.value.style.top = `${S}px`, w.value.style.bottom = "unset") : (w.value.style.top = "unset", w.value.style.bottom = `${S}px`);
    };
    De(() => {
      window.addEventListener("scroll", V);
    }), je(() => {
      window.removeEventListener("scroll", V);
    });
    const V = () => {
      C.value && N();
    }, f = i(t.currentPage), M = (y) => {
      const { value: S } = y.target, T = S.replace(/\D/g, "");
      f.value = T;
    }, z = () => {
      f.value * 1 === c.value || f.value * 1 === 0 || (f.value * 1 > u.data[u.data.length - 1] ? c.value = u.data[u.data.length - 1] : c.value = f.value * 1, b());
    }, D = (y) => {
      y.key === "Enter" && (f.value * 1 === c.value || f.value * 1 === 0 || (f.value * 1 > u.data[u.data.length - 1] ? c.value = u.data[u.data.length - 1] : c.value = f.value * 1, b()));
    };
    return (y, S) => {
      const T = ee("svg-icon"), $e = ee("dk-input");
      return n(), o("div", {
        class: $(["dk-pagination", `dk-pagination-${e.size}`, e.disabled ? "dk-pagination--disabled" : ""]),
        onScroll: V
      }, [
        e.showTotalNumber ? (n(), o("div", Ht, "共 " + A(e.total) + " 项数据", 1)) : x("", !0),
        e.showPageSize ? (n(), o("div", Ft, [
          Ve(h("ul", {
            class: "dk-pagination__select-list",
            ref_key: "selectPopRef",
            ref: w
          }, [
            (n(!0), o(Q, null, re(e.pageSizeOptions, (U, xe) => (n(), o("li", {
              class: $([{ "dk-pagination__select-item--active": g.value.indexOf(U) !== -1 }]),
              key: xe,
              onMousedown: ce((_e) => _(U), ["stop"])
            }, A(U) + " 条/页 ", 43, Et))), 128))
          ], 512), [
            [Te, C.value]
          ]),
          Ve(h("input", {
            "onUpdate:modelValue": S[0] || (S[0] = (U) => g.value = U),
            ref_key: "selectInputRef",
            ref: I,
            class: "dk-pagination__select-input",
            type: "text",
            readonly: "readonly",
            onFocus: H,
            onBlur: L
          }, null, 544), [
            [Ye, g.value]
          ]),
          C.value ? x("", !0) : (n(), ie(T, {
            key: 0,
            class: "dk-pagination-icon",
            size: e.size === "small" ? "14px" : "16px",
            color: e.disabled ? "#00000042" : "",
            name: "icon-chevron-down"
          }, null, 8, ["size", "color"])),
          C.value ? (n(), ie(T, {
            key: 1,
            class: "dk-pagination-icon",
            color: "#1E75FE",
            size: e.size === "small" ? "14px" : "16px",
            name: "icon-chevron-up"
          }, null, 8, ["size", "color"])) : x("", !0)
        ])) : x("", !0),
        e.showPageNumber || e.showJumper ? (n(), o("div", {
          key: 2,
          class: "dk-pagination__btn-prev",
          onClick: d,
          style: Z({ cursor: c.value <= 1 ? "not-allowed" : "pointer" })
        }, [
          R(T, {
            size: e.size === "small" ? "14px" : "16px",
            color: c.value === 1 || e.disabled ? "#00000042" : "",
            name: "icon-arrow-left"
          }, null, 8, ["size", "color"])
        ], 4)) : x("", !0),
        e.showPageNumber ? (n(), o("ul", Wt, [
          (n(!0), o(Q, null, re(u.data, (U, xe) => (n(), o("li", {
            key: U,
            class: $([c.value === U ? "dk-is-current" : "", U === "..." ? "dk-pagination__pager-item-ellipsis" : ""]),
            onClick: (_e) => m(U, xe)
          }, [
            U === "..." ? (n(), ie(T, {
              key: 0,
              name: "icon-ellipsis",
              color: e.disabled ? "#00000042" : ""
            }, null, 8, ["color"])) : (n(), o(Q, { key: 1 }, [
              be(A(U), 1)
            ], 64))
          ], 10, jt))), 128))
        ])) : x("", !0),
        e.showPageNumber ? (n(), o("div", {
          key: 4,
          class: "dk-pagination__btn-next",
          onClick: r,
          style: Z({ cursor: c.value === u.data[u.data.length - 1] ? "not-allowed" : "pointer" })
        }, [
          R(T, {
            size: e.size === "small" ? "14px" : "16px",
            color: c.value === u.data[u.data.length - 1] || e.disabled ? "#00000042" : "",
            name: "icon-arrow-right"
          }, null, 8, ["size", "color"])
        ], 4)) : x("", !0),
        e.showJumper ? (n(), o("div", {
          key: 5,
          class: $(["dk-pagination__jump", e.showPageNumber ? "" : "dk-pagination__simple"])
        }, [
          Kt,
          R($e, {
            disabled: e.disabled,
            modelValue: f.value,
            "onUpdate:modelValue": S[1] || (S[1] = (U) => f.value = U),
            onInput: M,
            onBlur: z,
            onKeydown: D,
            size: "small",
            class: "dk-pagination__jump-input",
            themeStatus: f.value > u.data[u.data.length - 1] || f.value === "0" ? "error" : "default"
          }, null, 8, ["disabled", "modelValue", "themeStatus"]),
          h("span", Yt, [
            be(" / "),
            h("span", qt, A(u.data[u.data.length - 1]), 1),
            be(" 页 ")
          ])
        ], 2)) : x("", !0),
        !e.showPageNumber && e.showJumper ? (n(), o("div", {
          key: 6,
          class: "dk-pagination__btn-next",
          onClick: r,
          style: Z({ cursor: c.value === u.data[u.data.length - 1] ? "not-allowed" : "pointer" })
        }, [
          R(T, {
            size: e.size === "small" ? "14px" : "16px",
            color: c.value === u.data[u.data.length - 1] || e.disabled ? "#00000042" : "",
            name: "icon-arrow-right"
          }, null, 8, ["size", "color"])
        ], 4)) : x("", !0)
      ], 34);
    };
  }
}), Ke = (e, s) => {
  const l = e.__vccOpts || e;
  for (const [t, a] of s)
    l[t] = a;
  return l;
}, Gt = Ml({
  name: "MenuIcon",
  props: {
    prefix: {
      type: String,
      default: "icon"
    },
    name: {
      type: String,
      required: !0
    },
    color: {
      type: String,
      default: ""
    },
    className: {
      type: String,
      default: ""
    },
    iconTitle: {
      type: String,
      default: ""
    }
  },
  setup(e) {
    const s = X(() => `#${e.name}`), l = X(() => e.className ? `menu-icon ${e.className}` : "menu-icon");
    return { symbolId: s, svgClass: l };
  }
}), Jt = ["href", "color"], Xt = { key: 0 };
function Qt(e, s, l, t, a, v) {
  return n(), o("svg", {
    class: $(e.svgClass),
    "aria-hidden": "true"
  }, [
    h("use", {
      class: "svg-use",
      href: e.symbolId,
      color: e.color
    }, null, 8, Jt),
    e.iconTitle ? (n(), o("title", Xt, A(e.iconTitle), 1)) : x("", !0)
  ], 2);
}
const Ee = /* @__PURE__ */ Ke(Gt, [["render", Qt]]);
var dl;
(function(e) {
  e.pop = "pop", e.push = "push";
})(dl || (dl = {}));
var cl;
(function(e) {
  e.back = "back", e.forward = "forward", e.unknown = "";
})(cl || (cl = {}));
var rl;
(function(e) {
  e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
})(rl || (rl = {}));
const Zt = Symbol(""), ea = Symbol("");
function Xe() {
  return fe(Zt);
}
function Qe() {
  return fe(ea);
}
const la = { class: "dk-navigation" }, ta = ["onClick"], aa = { class: "dk-menu-item-icon" }, na = { class: "dk-menu-item-title" }, sa = {
  key: 1,
  class: "dk-menu-item_inner"
}, oa = ["onClick"], ia = { class: "dk-menu-item-icon" }, ua = { class: "dk-menu-item-title" }, da = { class: "dk-menu-item-arrow" }, ca = ["id"], ra = ["id"], va = ["onClick"], fa = { class: "dk-menu-item-icon" }, ha = { class: "dk-menu-item-title" }, pa = /* @__PURE__ */ Object.assign({
  name: "DkMenuItem"
}, {
  __name: "menu-item",
  props: {
    pathActive: {
      type: String,
      default: ""
    },
    RouterList: {
      type: Array,
      default: []
    }
  },
  emits: ["menuClick"],
  setup(e, { emit: s }) {
    const l = s;
    Qe(), Xe(), i();
    const t = e, a = (c) => {
      oe(() => {
        t.RouterList.forEach((d) => {
          d.checked_path = !1, d.children && d.children.forEach((r) => {
            r.path == c.path && (d.checked_path = !0);
          });
        });
      }), console.log(t.RouterList);
      let m = {
        item: c,
        children: c.children
      };
      l("menuClick", m);
    }, v = (c) => {
      var m = document.getElementById(`dk-menu-item-arrow${c}`), d = document.getElementById(`dk-menu-item_con_children${c}`);
      console.log(d.children), m.style.transform == "rotate(90deg)" ? (m.style.transform = "rotate(0deg)", d.style.display = "none") : (m.style.transform = "rotate(90deg)", d.style.display = "block");
    };
    return (c, m) => {
      const d = ee("svg-icon");
      return n(), o("div", la, [
        (n(!0), o(Q, null, re(e.RouterList, (r, u) => (n(), o("div", {
          key: u,
          class: "dk-menu-item"
        }, [
          (!r.children || r.children.length == 0) && r.hidden != 1 ? (n(), o("div", {
            key: 0,
            class: $([
              t.pathActive == r.path ? "dk-is-actives" : "",
              "dk-menu-item_con"
            ]),
            onClick: (b) => a(r)
          }, [
            h("div", aa, [
              r.svgIcon ? (n(), ie(d, {
                key: 0,
                name: r.svgIcon
              }, null, 8, ["name"])) : (n(), ie(Ee, {
                key: 1,
                name: r.icon
              }, null, 8, ["name"]))
            ]),
            h("div", na, A(r.title), 1)
          ], 10, ta)) : x("", !0),
          r.children && r.children.length != 0 && r.hidden != 1 ? (n(), o("div", sa, [
            h("div", {
              class: $("dk-menu-item_con"),
              onClick: (b) => v(u),
              style: Z(r.checked_path == !0 ? "color: var(--Brand-Brand7-Normal, #1E75FE);" : "")
            }, [
              h("div", ia, [
                r.svgIcon ? (n(), ie(d, {
                  key: 0,
                  name: r.svgIcon
                }, null, 8, ["name"])) : (n(), ie(Ee, {
                  key: 1,
                  name: r.icon
                }, null, 8, ["name"]))
              ]),
              h("div", ua, A(r.title), 1),
              h("div", da, [
                h("span", {
                  id: `dk-menu-item-arrow${u}`
                }, [
                  R(d, {
                    color: r.checked_path == !0 ? "var(--Brand-Brand7-Normal, #1E75FE)" : "",
                    size: "16",
                    name: "icon-arrow-right"
                  }, null, 8, ["color"])
                ], 8, ca)
              ])
            ], 12, oa),
            h("div", {
              class: "dk-menu-item_con_children",
              id: `dk-menu-item_con_children${u}`
            }, [
              (n(!0), o(Q, null, re(r.children.filter((b) => b.hidden != 1), (b, k) => (n(), o("div", {
                class: $(["dk-menu-item_con_children_level", [
                  t.pathActive == b.path ? "dk-is-active" : "",
                  "dk-menu-item_con"
                ]]),
                key: k,
                onClick: (g) => a(b)
              }, [
                h("div", fa, [
                  R(Ee, {
                    name: b.icon
                  }, null, 8, ["name"])
                ]),
                h("div", ha, A(b.title), 1)
              ], 10, va))), 128))
            ], 8, ra)
          ])) : x("", !0)
        ]))), 128))
      ]);
    };
  }
}), ma = /* @__PURE__ */ Ke(pa, [["__scopeId", "data-v-7c42c730"]]), ga = { class: "dk-menu-fold" }, ka = ["onMouseenter", "onMouseleave"], ya = { class: "dk-menu-fold-icon" }, ba = { key: 0 }, _a = { key: 1 }, xa = ["id"], wa = { class: "dk-menu-fold-children-con-item" }, $a = ["onClick"], Ca = {
  key: 0,
  class: "dk-menu-fold-con-icon"
}, Sa = { class: "dk-menu-fold-con-title" }, Va = /* @__PURE__ */ Object.assign({
  name: "DkMenuFold"
}, {
  __name: "menu-item-fold",
  props: {
    pathActivefold: {
      type: String,
      default: ""
    },
    RouterList: {
      type: Array,
      default: []
    }
  },
  emits: ["menuClick"],
  setup(e, { emit: s }) {
    Qe(), Xe();
    const l = s, t = e, a = (d, r) => {
      if (console.log(d), r == 1 && d.children && d.children.length != 0)
        return !1;
      oe(() => {
        t.RouterList.forEach((b) => {
          b.checked_path = !1, b.children && b.children.forEach((k) => {
            k.path == d.path && (b.checked_path = !0);
          });
        });
      });
      let u = {
        item: d,
        children: d.children
      };
      l("menuClick", u), c();
    }, v = (d) => {
      var r = document.getElementById(`dk-menu-fold-children-con${d}`);
      r && (r.style.display = "block");
    }, c = () => {
      t.RouterList.forEach((d, r) => {
        var u = document.getElementById(`dk-menu-fold-children-con${r}`);
        u && (u.style.display = "none");
      });
    }, m = (d) => {
      d.stopPropagation();
    };
    return (d, r) => {
      const u = ee("svg-icon"), b = ee("dk-tooltip");
      return n(), o("div", ga, [
        (n(!0), o(Q, null, re(e.RouterList.filter((k) => k.hidden != 1), (k, g) => (n(), o("div", {
          key: g,
          class: $(["dk-menu-fold-item", [
            t.pathActivefold == k.path || k.checked_path ? "dk-is-active-folds" : ""
          ]]),
          onMouseenter: (_) => v(g),
          onMouseleave: (_) => c()
        }, [
          R(b, {
            onClick: (_) => a(k, 1),
            disabled: k.children && k.children.length != 0,
            trigger: "hover",
            width: "auto",
            type: "default",
            position: "right",
            title: k.title
          }, {
            default: we(() => [
              h("div", ya, [
                k.svgIcon || k.icon ? (n(), o("span", ba, [
                  k.svgIcon ? (n(), ie(u, {
                    key: 0,
                    name: k.svgIcon
                  }, null, 8, ["name"])) : (n(), ie(Ee, {
                    key: 1,
                    name: k.icon
                  }, null, 8, ["name"]))
                ])) : (n(), o("span", _a, A(k.title.slice(0, 2)), 1))
              ])
            ]),
            _: 2
          }, 1032, ["onClick", "disabled", "title"]),
          k.children && k.children != 0 ? (n(), o("div", {
            key: 0,
            onMouseenter: m,
            class: "dk-menu-fold-children-con",
            id: `dk-menu-fold-children-con${g}`
          }, [
            h("div", wa, [
              (n(!0), o(Q, null, re(k.children.filter((_) => _.hidden != 1), (_, C) => (n(), o("div", {
                class: $(["dk-menu-fold-con_children_level", [
                  t.pathActivefold == _.path ? "dk-is-active-fold" : ""
                ]]),
                key: C,
                onClick: (w) => a(_, 2)
              }, [
                _.svgIcon || _.icon ? (n(), o("div", Ca, [
                  k.svgIcon ? (n(), ie(u, {
                    key: 0,
                    name: k.svgIcon
                  }, null, 8, ["name"])) : (n(), ie(Ee, {
                    key: 1,
                    name: k.icon
                  }, null, 8, ["name"]))
                ])) : x("", !0),
                h("div", Sa, A(_.title), 1)
              ], 10, $a))), 128))
            ])
          ], 40, xa)) : x("", !0)
        ], 42, ka))), 128))
      ]);
    };
  }
}), za = /* @__PURE__ */ Ke(Va, [["__scopeId", "data-v-c6acd8b4"]]), Ma = { class: "dk-menu" }, Da = { class: "dk-menu-left" }, Ba = {
  key: 0,
  class: "fold-menu"
}, La = {
  key: 1,
  class: "tile-menu"
}, Ia = { class: "footer-menu" }, Na = ["onClick"], Ta = { class: "dk-menu-right-item-icon" }, Ra = /* @__PURE__ */ Object.assign({
  name: "DkMenu"
}, {
  __name: "menu",
  props: {
    ActivePath: {
      type: String,
      default: ""
    },
    RouterData: {
      type: Array,
      default: []
    }
  },
  emits: ["click"],
  setup(e, { emit: s }) {
    Qe(), Xe();
    const l = i(!1), t = i(), a = i(!1), v = i(!1), c = i(), m = i([]), d = s, r = e, u = () => {
      l.value = !l.value, console.log(l.value, "新加的代码---"), d("collapsed", l.value);
    }, b = () => {
      v.value = !v.value;
    }, k = (I) => {
      c.value = I.item.path, I.children && I.children.length != 0 ? (a.value = !0, m.value = I.children, g(I.children[0])) : (a.value = !1, d("click", I.item));
    }, g = (I) => {
      t.value = I.path, d("click", I);
    };
    se(() => r.ActivePath, (I, H) => {
      w(r.RouterData), _();
    }), De(() => {
      w(r.RouterData), _();
    });
    const _ = () => {
      r.RouterData.forEach((I) => {
        I.checked_path = !1, I.children && I.children.forEach((H) => {
          H.path == c.value && (I.checked_path = !0);
        });
      });
    }, C = (I) => {
      var L, N;
      if (!((L = I.meta) != null && L.level) && I.path == r.ActivePath)
        return console.log("这是一级或者二级"), console.log(I.path), c.value = I.path, !1;
      if ((N = I.meta) != null && N.level && I.path == r.ActivePath)
        return console.log("这是三级"), c.value = H.path, t.value = item.path, !1;
      if (I.children) {
        I.children.map((V) => C(V));
        var H = I.perantactive;
      }
    }, w = (I) => (console.log(c.value), I.map((H) => C(H)));
    return (I, H) => {
      const L = ee("dk-menu-fold"), N = ee("dk-menu-item"), V = ee("svg-icon");
      return n(), o("div", Ma, [
        h("div", Da, [
          l.value ? (n(), o("div", Ba, [
            R(L, {
              pathActivefold: c.value,
              onMenuClick: k,
              RouterList: e.RouterData
            }, null, 8, ["pathActivefold", "RouterList"])
          ])) : x("", !0),
          l.value ? x("", !0) : (n(), o("div", La, [
            R(N, {
              pathActive: c.value,
              onMenuClick: k,
              RouterList: e.RouterData
            }, null, 8, ["pathActive", "RouterList"])
          ])),
          h("div", Ia, [
            h("span", {
              onClick: u,
              style: Z(l.value ? "transform: rotate(180deg);" : "")
            }, [
              R(V, { name: "icon-menu" })
            ], 4)
          ])
        ]),
        a.value ? (n(), o("div", {
          key: 0,
          class: "dk-menu-right",
          style: Z(v.value ? "width:52px" : "width:114px")
        }, [
          h("div", {
            class: "dk-menu-righ-con",
            style: Z(v.value ? "display:none" : "display:block")
          }, [
            (n(!0), o(Q, null, re(m.value, (f, M) => (n(), o("div", {
              class: $(["dk-menu-right-item", [t.value == f.path ? "dk-is-active-Three" : ""]]),
              key: M,
              onClick: (z) => g(f)
            }, A(f.title), 11, Na))), 128))
          ], 4),
          h("div", Ta, [
            h("span", {
              onClick: b,
              style: Z(v.value ? "transform: rotate(180deg);" : "")
            }, [
              R(V, { name: "icon-menu" })
            ], 4)
          ])
        ], 4)) : x("", !0)
      ]);
    };
  }
}), Aa = /* @__PURE__ */ Ke(Ra, [["__scopeId", "data-v-93b0e5c1"]]), Oa = {
  key: 0,
  class: "dk-input--prefix-icon"
}, Pa = { class: "dk-slect__scroll-wrapper" }, Ha = { class: "dk-select__label-text" }, Fa = ["onClick"], Ea = {
  key: 1,
  class: "dk-placeholder-text"
}, Wa = ["readonly"], ja = {
  key: 0,
  class: "dk-select-empty"
}, Ka = /* @__PURE__ */ Object.assign({
  name: "DkSelect"
}, {
  __name: "select",
  props: {
    modelValue: {
      type: [String, Number, Array],
      default: void 0
    },
    size: {
      type: String,
      default: "small"
      // small/medium/large
    },
    suffixIconName: {
      type: String,
      default: "icon-chevron-down"
    },
    perfixIconName: {
      type: String,
      default: ""
    },
    placeholder: {
      type: String,
      default: "请选择"
    },
    multiple: {
      type: Boolean,
      default: !1
    },
    filterable: {
      type: Boolean,
      default: !1
    },
    clearable: {
      type: Boolean,
      default: !1
    },
    disabled: {
      type: Boolean,
      default: !1
    },
    onChange: {
      type: Function,
      default: () => {
      }
    },
    max: {
      type: Number,
      default: 0
    },
    onScroll: {
      type: Function,
      default: () => {
      }
    }
  },
  emits: ["update:modelValue"],
  setup(e, { expose: s, emit: l }) {
    const t = e, a = i(t.modelValue), v = i(t.multiple), c = i(), m = i([]), d = fe("formItemEvent"), r = i(!1), u = (P, de) => {
      var ke, ze;
      r.value = !0, t.multiple ? de ? (a.value.indexOf(P.value) === -1 && (a.value.push(P.value), a.value = [...a.value], t.onChange(a.value), d == null || d.eventType("change", a.value), g("update:modelValue", a.value)), m.value.push(P)) : (a.value = (ke = a.value) == null ? void 0 : ke.filter((Ne) => Ne !== P.value), m.value = m.value.filter((Ne) => Ne.value !== P.value), g("update:modelValue", a.value), t.onChange(a.value), d == null || d.eventType("change", a.value)) : (g("update:modelValue", P.value), c.value = P.label, d == null || d.eventType("change", a.value), t.onChange(P), (ze = L.value) == null || ze.blur());
    }, b = () => {
      console.log("handleSelectScroll");
    }, k = () => {
      L.value.focus();
    }, g = l, _ = i(), C = i(t.size), w = i(t.max);
    Oe("selectEvents", {
      modelValue: a,
      updateModelValue: u,
      setFocus: k,
      multiple: v,
      fliterInputValue: _,
      moduleSize: C,
      max: w
    });
    const I = X(() => {
      if (t.size === "small")
        return "12px";
      if (t.size === "medium")
        return "14px";
      if (t.size === "large")
        return "16px";
    }), H = X(() => {
      if (t.multiple && t.perfixIconName !== "")
        return "0px";
      if (t.multiple && t.perfixIconName === "")
        return "4px";
      if (!t.multiple && t.perfixIconName !== "")
        return "0px";
      if (!t.multiple && t.perfixIconName === "")
        return "8px";
    }), L = i(), N = i(!1), V = (P) => {
      t.disabled || (N.value ? (L.value.blur(), N.value = !1) : (L.value.focus(), N.value = !0));
    }, f = i(!1), M = () => {
      t.disabled || (Be.value && t.clearable ? f.value = !0 : f.value = !1);
    }, z = () => {
      f.value = !1;
    }, D = (P) => {
      r.value = !0, t.multiple ? (m.value = [], a.value = [], d == null || d.eventType("change", a.value), g("update:modelValue", a.value), t.onChange(a.value)) : (c.value = void 0, a.value = void 0, d == null || d.eventType("change", a.value), g("update:modelValue", void 0), c.value = t.placeholder, t.onChange(a.value)), P.stopPropagation(), P.preventDefault();
    }, y = (P) => {
      O.value.scrollTop = 0, P.stopPropagation(), P.preventDefault();
    };
    se(
      () => t.modelValue,
      (P) => {
        Be.value && oe(() => {
          a.value = P;
        }), P === void 0 && (c.value = t.placeholder, m.value = [], t.multiple ? (a.value = [], g("update:modelValue", [])) : (a.value = void 0, g("update:modelValue", void 0)));
      }
    ), se(
      () => a.value,
      (P) => {
        t.multiple && (P.length === 0 && (f.value = !1), r.value ? r.value = !1 : t.onChange(a.value));
      }
    );
    let S = i(null), T = i(null);
    const $e = i(null), U = (P) => {
      N.value = !1, N.value = !0, S.value = setInterval(() => {
        var de;
        T.value = (de = te.value) == null ? void 0 : de.getBoundingClientRect().top;
      }, 40), oe(() => {
        K(), _e.value && (_e.value.scrollLeft = 0);
      });
    };
    se(
      () => T.value,
      (P, de) => {
        N.value && K();
      }
    );
    const xe = (P) => {
      P.stopPropagation(), P.preventDefault();
    }, _e = i(null), le = (P) => {
      clearInterval(S.value), N.value = !1, _.value = void 0, _e.value && (_e.value.scrollLeft = 0);
    }, Re = i(0);
    se(
      () => N.value,
      (P, de) => {
        oe(() => {
          var ke;
          Re.value = (ke = O.value) == null ? void 0 : ke.getElementsByClassName("dk-select-item").length;
        });
      }
    );
    const Me = (P) => {
      P.target.value;
    }, O = i(), te = i(), ue = (P) => {
      P && (O.value = P);
    }, ae = fe("dialogBodyRef", null), ne = fe("dialogRef", null), j = fe("dkTable", null), K = () => {
      var F;
      const { top: P, width: de, bottom: ke } = te.value.getBoundingClientRect(), ze = (F = O.value) == null ? void 0 : F.offsetHeight, Ne = te.value.offsetHeight;
      if (window.innerHeight - te.value.getBoundingClientRect().bottom - 6 >= ze)
        ae || j ? (O.value.style.top = `${P - ne.value.offsetTop + Ne}px`, O.value.style.minWidth = `${de}px`) : (O.value.style.top = `${P + Ne}px`, O.value.style.minWidth = `${de}px`), O.value.style.bottom = "unset";
      else if (O.value.style.top = "unset", ae || j) {
        let Y = (window.innerHeight - ne.value.offsetHeight) / 2;
        O.value.style.bottom = `${window.innerHeight - ke - Y + Ne}px`, O.value.style.minWidth = `${de}px`;
      } else
        O.value.style.bottom = `${window.innerHeight - ke + Ne / 2}px`, O.value.style.minWidth = `${de}px`;
    };
    De(() => {
      !t.multiple && !Be.value && oe(() => {
        c.value = t.placeholder;
      });
    });
    const me = (P, de) => {
      t.disabled || (r.value = !0, P.stopPropagation(), P.preventDefault(), m.value = m.value.filter((ke) => ke.value !== de.value), a.value = a.value.filter((ke) => ke !== de.value), g("update:modelValue", a.value), t.onChange(a.value));
    }, Be = X(() => {
      let P = !1;
      return Array.isArray(t.modelValue) && t.modelValue.length > 0 || typeof t.modelValue == "string" && t.modelValue !== "" || typeof t.modelValue == "number" && !isNaN(t.modelValue) ? P = !0 : P = !1, P;
    }), Le = X(() => {
      let P = !1;
      return Be.value || (P = !0), P;
    }), pe = (P) => {
      t.multiple || t.onScroll(P);
    };
    function ge(P) {
      if (P.nodeType === Node.ELEMENT_NODE && P.classList.contains("dk-is-selected"))
        return P;
      for (let de = 0; de < P.childNodes.length; de++) {
        const ke = P.childNodes[de], ze = ge(ke);
        if (ze)
          return ze;
      }
      return null;
    }
    return s({
      scrollPosition: () => {
        if (!t.multiple) {
          const P = ge(O.value);
          O.value.scrollTop = P.offsetTop - O.value.offsetHeight / 2;
        }
      },
      setPopPossition: K
    }), (P, de) => {
      const ke = ee("svg-icon");
      return n(), o("div", {
        ref_key: "selectRef",
        ref: $e,
        class: $(["dk-select", `dk-select-size--${e.size}`, e.disabled ? "dk-select--disabled" : ""]),
        onScroll: b
      }, [
        h("div", {
          class: $([
            "dk-select__wrap",
            e.perfixIconName !== "" ? "dk-perfix-icon_wrap" : "",
            e.suffixIconName !== "" ? "dk-suffix-icon_wrap" : "",
            N.value ? "dk-focused_select" : ""
          ]),
          onClick: V,
          ref_key: "selectInputRef",
          ref: te,
          onMouseenter: M,
          onMouseleave: z
        }, [
          e.perfixIconName !== "" ? (n(), o("span", Oa, [
            R(ke, {
              class: "dk-select__icon",
              color: e.disabled ? "rgba(0, 0, 0, 0.26)" : N.value ? "#1E75FE" : "",
              size: I.value,
              name: e.perfixIconName
            }, null, 8, ["color", "size", "name"])
          ])) : x("", !0),
          h("div", {
            class: "dk-select__input",
            ref_key: "scrollWrapper",
            ref: _e,
            onMousedown: ce(xe, ["stop"]),
            style: Z({ "padding-left": H.value })
          }, [
            h("div", Pa, [
              !v.value && !_.value ? (n(), o("span", {
                key: 0,
                class: $([
                  "dk-select__label-text",
                  N.value && e.filterable ? "dk-like-placeholder-focus" : "",
                  e.perfixIconName !== "" ? "has-perfix-icon" : "",
                  Le.value ? "dk-placeholder-text" : ""
                ]),
                style: Z({ "padding-left": N.value && e.filterable ? H.value : "" })
              }, A(c.value), 7)) : x("", !0),
              v.value ? (n(), o("span", {
                key: 1,
                class: $(["dk-select-tag__wrapper", e.perfixIconName !== "" ? "has-perfix-icon" : ""])
              }, [
                m.value.length > 0 ? (n(!0), o(Q, { key: 0 }, re(m.value, (ze, Ne) => (n(), o("span", {
                  class: "dk-select-tag",
                  key: Ne
                }, [
                  h("span", Ha, A(ze.label), 1),
                  h("span", {
                    class: "dk-select-tag__close",
                    onClick: ce((He) => me(He, ze), ["stop"]),
                    style: { cursor: "pointer" }
                  }, [
                    R(ke, {
                      class: "dk-select__icon",
                      size: I.value,
                      name: "icon-close"
                    }, null, 8, ["size"])
                  ], 8, Fa)
                ]))), 128)) : (n(), o("span", Ea, A(e.placeholder), 1))
              ], 2)) : x("", !0),
              Ve(h("input", {
                class: $([
                  e.filterable && v.value ? "dk-select__input-multiple" : "",
                  e.filterable && !v.value ? "dk-select__input-single" : "",
                  e.perfixIconName !== "" && !v.value ? "input-perfix-left" : ""
                ]),
                ref_key: "inputRef",
                ref: L,
                type: "text",
                readonly: !e.filterable,
                style: Z({ cursor: e.filterable ? "text" : "pointer" }),
                onFocus: U,
                onBlur: le,
                "onUpdate:modelValue": de[0] || (de[0] = (ze) => _.value = ze),
                onInput: Me
              }, null, 46, Wa), [
                [Ye, _.value]
              ])
            ])
          ], 36),
          e.suffixIconName !== "" && !f.value ? (n(), o("span", {
            key: 1,
            onMousedown: ce(xe, ["stop"]),
            class: $(["dk-input__suffix-icon dk-input__select-icon", N.value ? "dk-select__rotate" : ""]),
            style: Z({ cursor: e.filterable ? "default" : "pointer" })
          }, [
            R(ke, {
              class: "dk-select__icon",
              color: e.disabled ? "rgba(0, 0, 0, 0.26)" : N.value ? "#1E75FE" : "",
              size: I.value,
              name: e.suffixIconName
            }, null, 8, ["color", "size", "name"])
          ], 38)) : x("", !0),
          f.value && Be.value ? (n(), o("span", {
            key: 2,
            onMousedown: ce(D, ["stop"]),
            class: "dk-input__suffix-icon dk-input__clear-icon",
            style: Z({ cursor: e.filterable ? "default" : "pointer" })
          }, [
            R(ke, {
              class: "dk-select__icon",
              size: I.value,
              name: "icon-clear",
              color: "rgba(0, 0, 0, 0.40)"
            }, null, 8, ["size"])
          ], 36)) : x("", !0)
        ], 34),
        Ve(h("div", {
          ref: N.value ? (ze) => ue(ze) : "",
          class: "dk-select__dropdown",
          onScroll: pe
        }, [
          h("div", {
            onMousedown: ce(y, ["stop"])
          }, [
            J(P.$slots, "slotOption")
          ], 32),
          J(P.$slots, "default"),
          Re.value === 0 ? (n(), o("div", ja, "暂无数据")) : x("", !0)
        ], 544), [
          [Te, N.value]
        ])
      ], 34);
    };
  }
}), Ya = { class: "dk-option-group-title" }, qa = { class: "dk-gropu-options" }, Ua = /* @__PURE__ */ Object.assign({
  name: "DkOptionGroup"
}, {
  __name: "option-group",
  props: {
    label: {
      type: String,
      default: ""
    },
    divider: {
      type: Boolean,
      default: !0
    },
    size: {
      type: String,
      default: "medium"
      // small/medium/large
    }
  },
  setup(e) {
    return (s, l) => {
      const t = ee("dk-divider");
      return n(), o("div", {
        class: $(["dk-option-group", `dk-option-group--${e.size}`])
      }, [
        h("div", Ya, A(e.label), 1),
        h("div", qa, [
          J(s.$slots, "default")
        ]),
        e.divider ? (n(), ie(t, {
          key: 0,
          class: "dk-option-group-divider"
        })) : x("", !0)
      ], 2);
    };
  }
}), Ga = /* @__PURE__ */ Object.assign({
  name: "DkOption"
}, {
  __name: "option",
  props: {
    label: {
      type: [String, Number],
      default: ""
    },
    value: {
      type: [String, Number],
      default: ""
    },
    disabled: {
      type: Boolean,
      default: !1
    }
  },
  setup(e) {
    const s = e, l = fe("selectEvents"), t = i(l.multiple), a = X(() => l.moduleSize.value);
    let v = We({
      bindValue: []
    });
    const c = i(!1), m = (g) => {
      (s.disabled || t.value) && (c.value = g, l.setFocus()), l.updateModelValue({ value: s.value, label: s.label }, g), g ? d.value.classList.add("dk-is-selected") : d.value.classList.remove("dk-is-selected");
    }, d = i();
    l.multiple.value ? (v.bindValue = [...l.modelValue.value], v.bindValue.indexOf(s.value) !== -1 ? (c.value = !0, l.updateModelValue({ label: s.label, value: s.value }, !0)) : c.value = !1) : l.modelValue.value === s.value && (c.value = !0, v.bindValue = [l.modelValue.value], l.updateModelValue({ label: s.label, value: s.value }));
    const r = i(!1), u = () => {
      var g;
      if (s.disabled) {
        r.value = !0;
        return;
      }
      Array.isArray(l.modelValue.value) && (((g = l.modelValue.value) == null ? void 0 : g.length) >= l.max.value && l.max.value !== 0 && !c.value ? r.value = !0 : r.value = !1);
    };
    se(() => l.modelValue.value, (g) => {
      Array.isArray(g) ? (g.includes(s.value) && !c.value && (l.updateModelValue({ value: s.value, label: s.label }, !0), c.value = !0), oe(() => {
        const _ = g.includes(s.value);
        v.bindValue = [...g], c.value = _, s.disabled || g.length >= l.max.value && l.max.value !== 0 && !c.value ? r.value = !0 : r.value = !1;
      })) : (g === void 0 && oe(() => {
        c.value = !1, d.value.classList.remove("dk-is-selected");
      }), g === s.value && !c.value && l.updateModelValue({ value: s.value, label: s.label }, !0), oe(() => {
        s.value === g ? (c.value = !0, v.bindValue = [s.value]) : c.value = !1;
      }));
    }), De(() => {
      oe(() => {
        u();
      });
    });
    const b = i(!0);
    se(() => l.fliterInputValue.value, (g) => {
      if (g === "" || g === void 0) {
        b.value = !0;
        return;
      }
      s.label.includes(g) || s.value.toString().includes(g) ? oe(() => {
        b.value = !0;
      }) : oe(() => {
        b.value = !1;
      });
    });
    const k = (g, _) => {
      if (g.stopPropagation(), g.preventDefault(), _ !== void 0)
        if (s.disabled || t.value) {
          l.setFocus();
          return;
        } else {
          if (s.disabled)
            return;
          oe(() => {
            c.value = _ === s.value, l.updateModelValue({ label: s.label, value: s.value });
            const C = d.value;
            C.classList.add("dk-is-selected"), Array.from(C.parentNode.children).forEach((I) => {
              I !== C && I.classList.remove("dk-is-selected");
            });
          });
        }
    };
    return (g, _) => {
      const C = ee("dk-checkbox");
      return Ve((n(), o("div", {
        ref_key: "selectItenRef",
        ref: d,
        class: $([
          "dk-select-item",
          `dk-select-item-size--${a.value}`,
          e.disabled ? "dk-select-item__disabled" : "",
          G(l).multiple.value ? c.value : c.value && e.value === G(l).modelValue.value ? "dk-is-selected" : ""
        ]),
        onMousedown: _[0] || (_[0] = ce((w) => k(w, e.value), ["stop"]))
      }, [
        h("span", null, [
          t.value ? (n(), ie(C, {
            key: 0,
            onChange: m,
            checked: c.value,
            disabled: r.value
          }, {
            default: we(() => [
              Se().customLabel ? J(g.$slots, "customLabel", { key: 0 }) : (n(), o(Q, { key: 1 }, [
                be(A(e.label), 1)
              ], 64))
            ]),
            _: 3
          }, 8, ["checked", "disabled"])) : (n(), o(Q, { key: 1 }, [
            Se().customLabel ? J(g.$slots, "customLabel", { key: 0 }) : (n(), o(Q, { key: 1 }, [
              be(A(e.label), 1)
            ], 64))
          ], 64))
        ])
      ], 34)), [
        [Te, b.value]
      ]);
    };
  }
}), Ja = {
  key: 0,
  class: /* @__PURE__ */ $(["dk-form-item__label-icon"])
}, Xa = {
  class: /* @__PURE__ */ $(["dk-form-item__content-inner"])
}, Qa = /* @__PURE__ */ Object.assign({
  name: "DkFormItem"
}, {
  __name: "form-item",
  props: {
    label: {
      type: String,
      default: ""
    },
    prop: {
      type: String,
      default: ""
    },
    promptContent: {
      type: Object,
      default: {
        title: "",
        trigger: "hover",
        type: "default",
        position: "top",
        width: "80px"
      }
    },
    requiredMark: {
      type: Boolean,
      default: !1
    },
    align: {
      type: String,
      default: "left"
    },
    hiddenIcon: {
      type: Boolean,
      default: !1
    },
    desc: {
      type: String,
      default: ""
    },
    labelWidth: {
      type: String,
      default: void 0
    }
  },
  setup(e) {
    const s = e, l = fe("formInfos"), t = i(l.checkedResult), a = i(l.data);
    l.hasPropItems(s.prop, ""), se(() => s.prop, (_, C) => {
      l.hasPropItems(_, C);
    });
    const v = i(null), c = i(null), m = (_) => {
      if ([..._].length === 0) {
        v.value = null, c.value = null;
        return;
      }
      let C = [..._].filter((w) => w.name === s.prop)[0];
      C && Object.keys(C).length !== 0 ? (v.value = C.message, c.value = C.type) : (v.value = null, c.value = null);
    };
    se(() => t.value, (_) => {
      m(_);
    }, { immediate: !0 });
    const d = X(() => c.value === "error" ? "icon-error" : c.value === "warning" ? "icon-warning" : c.value === "success" ? "icon-success" : "");
    s.prop && a.value[s.prop] && l.rules && l.rules[s.prop] && (Array.isArray(a.value[s.prop]) && a.value[s.prop].length === 0 || l.validateItem({ key: s.prop, value: a.value[s.prop] }, "init"));
    const r = i(!1), u = (_) => {
      r.value = !0;
    }, b = () => {
      r.value = !1;
    }, k = (_) => {
      _.stopPropagation();
    };
    return Oe("formItemEvent", {
      eventType: (_, C) => {
        l.validateItem({ key: s.prop, value: C }, _);
      }
    }), (_, C) => {
      const w = ee("svg-icon"), I = ee("dk-tooltip");
      return n(), o("div", {
        ref: "formItem",
        onClick: k,
        class: $(["dk-form-item", G(l).labelPosition === "top" ? "dk-label-align-top" : ""])
      }, [
        h("div", {
          class: $([
            "dk-form-item__label",
            e.label ? `dk-form__label--${G(l).labelPosition}` : ""
          ]),
          style: Z({ width: e.labelWidth ? e.labelWidth : G(l).labelWidth }),
          ref: "labelRef"
        }, [
          h("span", {
            class: $(["dk-form-item__label-text", e.prop !== "" && G(l).rules[e.prop] || e.requiredMark ? "dk-form-item__label-mark" : ""])
          }, [
            h("span", null, A(e.label), 1),
            e.promptContent.title !== "" ? (n(), o("span", Ja, [
              R(I, {
                width: e.promptContent.width,
                trigger: e.promptContent.trigger,
                position: e.promptContent.position,
                type: e.promptContent.type,
                title: e.promptContent.title,
                onMouseenter: u,
                onMouseleave: b
              }, {
                default: we(() => [
                  R(w, {
                    name: "icon-question-filled",
                    color: r.value ? "rgba(0,0,0,0.9)" : "rgba(0,0,0,0.4)"
                  }, null, 8, ["color"])
                ]),
                _: 1
              }, 8, ["width", "trigger", "position", "type", "title"])
            ])) : x("", !0)
          ], 2)
        ], 6),
        h("div", {
          class: $([
            "dk-form-item__content",
            c.value ? `di-is-${c.value}` : ""
          ])
        }, [
          h("div", Xa, [
            h("div", {
              ref: "itemRef",
              class: $(["dk-form__controls-content", e.align === "right" ? "dk-form-item__content-inner-right" : "dk-form-item__content-inner-left"])
            }, [
              J(_.$slots, "default")
            ], 2),
            G(l).statusIcon ? (n(), o("div", {
              key: 0,
              class: $(G(l).statusIcon ? "dk-form-item__status-icon" : "")
            }, [
              c.value && e.prop && !e.hiddenIcon ? (n(), ie(w, {
                key: 0,
                name: d.value
              }, null, 8, ["name"])) : x("", !0)
            ], 2)) : x("", !0)
          ]),
          c.value || e.desc !== "" ? (n(), o("div", {
            key: 0,
            class: $(["dk-form-item__desc", !c.value && e.desc !== "" ? "dk-form-item--desc-text" : ""])
          }, A(v.value || e.desc), 3)) : x("", !0)
        ], 2)
      ], 2);
    };
  }
}), Za = /* @__PURE__ */ Object.assign({
  name: "DkForm"
}, {
  __name: "index",
  props: {
    data: {
      type: Object,
      default: {}
    },
    inline: {
      type: Boolean,
      default: !1
    },
    labelPosition: {
      type: String,
      default: "right"
      // right/left/top
    },
    labelWidth: {
      type: String,
      default: "50px"
      // '50px'
    },
    rules: {
      type: Array,
      default: () => []
    },
    statusIcon: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["update:data.name"],
  setup(e, { expose: s, emit: l }) {
    const t = Se(), a = e, v = (L) => {
      L.preventDefault();
    }, c = i(!1), m = i([]), d = (L, N) => new Promise((V, f) => {
      const M = [];
      if (a.data) {
        let z = a.data;
        for (let D in z)
          if (b.value.includes(D) && z.hasOwnProperty(D)) {
            const y = z[D];
            a.rules[D] && a.rules[D].length > 0 && a.rules[D].some((S) => {
              if (S.required && !r(y))
                return M.push({ name: D, message: S.message, type: S.type ? S.type : "error" }), !0;
              if (S.pattern && !S.pattern.test(y))
                return M.push({ name: D, message: S.message, type: S.type ? S.type : "error" }), !0;
              if (y !== "" && (S.min && y.length < S.min || S.max && y.length > S.max))
                return M.push({ name: D, message: S.message, type: S.type ? S.type : "error" }), !0;
              if (S.validator && typeof S.validator == "function") {
                let T = S.validator(y);
                if (T === !0)
                  return !1;
                if (typeof T == "object")
                  return T.result ? (M.push({ result: T.result, name: D, message: T.message, type: T.type ? T.type : "error" }), !1) : (M.push({ result: T.result, name: D, message: T.message, type: T.type ? T.type : "error" }), !0);
              }
              return !1;
            });
          }
        if (m.value = M, M.length > 0) {
          let D = M.some((y) => !y.result);
          V({ data: !D });
        } else
          V({ data: !0 });
      } else
        V({ data: !0 });
    }), r = (L) => {
      let N = !1;
      return Array.isArray(L) && L.length > 0 || typeof L == "string" && L !== "" || typeof L == "number" && !isNaN(L) ? N = !0 : N = !1, N;
    }, u = (L, N) => {
      if (!c.value && (N === "init" || N === "blur" || N === "input" || N === "change")) {
        let V = a.rules[L.key], f = {};
        const M = L.value, z = ["blur", "change", "init", "input"];
        V == null || V.some((y) => {
          if (y.required && !r(M) && z.includes(y.trigger))
            return f = { name: L.key, message: y.message, type: y.type ? y.type : "error", trigger: y.trigger }, !0;
          if (y.pattern && !y.pattern.test(M) && z.includes(y.trigger))
            return f = { name: L.key, message: y.message, type: y.type ? y.type : "error", trigger: y.trigger }, !0;
          if (M !== "" && z.includes(y.trigger) && (y.min && M.length < y.min || y.max && M.length > y.max))
            return f = { name: L.key, message: y.message, type: y.type ? y.type : "error", trigger: y.trigger }, !0;
          if (y.validator && typeof y.validator == "function") {
            let S = y.validator(M);
            if (S === !0)
              return !1;
            if (typeof S == "string")
              return f = { result: S.result, name: L.key, message: S, type: y.type ? y.type : "error", trigger: L.trigger }, !0;
            if (typeof S == "object")
              return S.result ? (f = { result: S.result, name: L.key, message: S.message, type: S.type ? S.type : "error", trigger: L.trigger }, !1) : (f = { result: S.result, name: L.key, message: S.message, type: S.type ? S.type : "error", trigger: L.trigger }, !0);
          }
          return !1;
        });
        const D = [...m.value];
        if (Object.keys(f).length > 0) {
          const y = D.findIndex((S) => S.name === L.key);
          y !== -1 ? D[y] = { name: f.name, message: f.message, type: f.type ? f.type : "error", trigger: f.trigger } : D.push(f);
        } else {
          const y = D.findIndex((S) => S.name === L.key);
          y !== -1 && D.splice(y, 1);
        }
        m.value = D;
      }
    }, b = i([]), k = (L, N) => {
      if (b.value.push(L), b.value.includes(N)) {
        const V = b.value.findIndex((f) => f === N);
        V !== -1 && b.value.splice(V, 1);
      }
    }, g = i(a.statusIcon), _ = i(a.data);
    Oe("formInfos", {
      data: _,
      inline: a.inline,
      labelPosition: a.labelPosition,
      labelWidth: a.labelWidth,
      checkedResult: m,
      statusIcon: g.value,
      validateItem: u,
      rules: a.rules,
      hasPropItems: k
    });
    const C = async () => (m.value = [], (await d()).data), w = i(null), I = () => {
      c.value = !0, t.default() && t.default().forEach((L) => {
        typeof L.children.default == "function" && L.children.default().forEach((N) => {
          N.dynamicProps && N.dynamicProps[0] === "modelValue" && N.props["onUpdate:modelValue"](H(N.props.modelValue));
        });
      }), m.value = [], setTimeout(() => {
        c.value = !1;
      }, 100);
    }, H = (L) => {
      if (L === null)
        return null;
      if (typeof L == "object")
        return Array.isArray(L) ? [] : {};
    };
    return s({
      validate: C,
      clearValidate: I
    }), (L, N) => (n(), o("form", {
      ref_key: "formRef",
      ref: w,
      class: $(["dk-form", e.inline ? "dk-form--inline" : "dk-form--default"]),
      onSubmit: ce(v, ["prevent"])
    }, [
      J(L.$slots, "default", {
        onBlur: N[0] || (N[0] = (...V) => L.handleBlur && L.handleBlur(...V))
      })
    ], 34));
  }
}), en = ["onClick"], ln = { class: "dk-tabs__nav-item-text-wrapper" }, tn = { style: { "text-wrap": "nowrap" } }, an = ["onClick"], nn = /* @__PURE__ */ Object.assign({
  name: "DkTabs"
}, {
  __name: "dk-tabs",
  props: {
    modelValue: {
      type: [String, Number],
      default: void 0
    },
    theme: {
      type: String,
      default: "normal"
      // normal, card
    },
    size: {
      type: String,
      default: "medium"
      // medium, large
    },
    placement: {
      type: String,
      default: "top"
      // top, left
    },
    addable: {
      type: Boolean,
      default: !1
    },
    add: {
      type: Function,
      default: () => {
      }
    },
    remove: {
      type: Function,
      default: () => {
      }
    },
    onChange: {
      type: Function,
      default: () => {
      }
    }
  },
  emits: ["update:modelValue", "add", "remove"],
  setup(e, { emit: s }) {
    const l = e, t = i([]), a = (f) => {
      t.value.push(f);
    }, v = i(l.modelValue);
    Oe("tabsInfos", {
      setHeaderItem: a,
      activeTabValue: v
    });
    const c = s, m = i(0), d = i(0), r = i(0), u = i(0), b = (f, M) => {
      f.value === v.value || f.disabled || (v.value = f.value, c("update:modelValue", f.value), oe(() => {
        if (k.value) {
          let z = k.value;
          m.value = z.offsetWidth, d.value = z.offsetHeight, r.value = z.offsetLeft, u.value = z.offsetHeight * M + M * 8;
        }
      }));
    }, k = i(null), g = (f) => {
      f && (k.value = f);
    }, _ = i(!1);
    De(() => {
      oe(() => {
        if (!k.value)
          return;
        let f = k.value;
        if (l.placement === "left")
          setTimeout(() => {
            d.value = f.offsetHeight, u.value = f.offsetTop;
          }, 100);
        else {
          setTimeout(() => {
            m.value = f.offsetWidth, r.value = f.offsetLeft;
          }, 100);
          let M = C.value.offsetWidth, z = w.value.offsetWidth;
          M < z && (_.value = !0, l.addable ? l.size === "large" ? (w.value.style.marginRight = "98px", w.value.style.marginLeft = "49px") : (w.value.style.marginRight = "80px", w.value.style.marginLeft = "40px") : l.size === "large" ? (w.value.style.marginRight = "49px", w.value.style.marginLeft = "49px") : (w.value.style.marginRight = "40px", w.value.style.marginLeft = "40px"));
        }
      });
    });
    const C = i(null), w = i(null), I = () => {
      c("add"), oe(() => {
        let f = C.value.offsetWidth, M = w.value.offsetWidth;
        f < M + 40 && (_.value = !0, w.value.style.marginRight = "80px", w.value.style.marginLeft = "40px"), l.theme !== "card" && oe(() => {
          let z = k.value;
          setTimeout(() => {
            m.value = z.offsetWidth, r.value = z.offsetLeft;
          }, 100);
        });
      });
    }, H = (f, M) => {
      if (M < 0)
        return !1;
      oe(() => {
        let z = C.value.offsetWidth, D = w.value.offsetWidth;
        z > D && (_.value = !1, w.value.style.marginRight = "0px", w.value.style.marginLeft = "0px");
      }), t.value.splice(M, 1), t.value.length !== 0 && (v.value === f ? v.value = t.value[Math.max(M - 1, 0)].value : oe(() => {
        setTimeout(() => {
          let z = k.value;
          m.value = z.offsetWidth, r.value = z.offsetLeft;
        }, 100);
      }), c("remove", f, M));
    };
    se(
      () => l.modelValue,
      (f) => {
        v.value = f, l.onChange(v.value), oe(() => {
          if (k.value) {
            let M = k.value;
            setTimeout(() => {
              m.value = M.offsetWidth, r.value = M.offsetLeft;
            }, 100);
          }
        });
      }
    );
    const L = () => {
      C.value && (C.value.scrollLeft -= C.value.offsetWidth);
    }, N = () => {
      C.value && (C.value.scrollLeft += C.value.offsetWidth);
    }, V = X(() => {
      let f = 0;
      return _.value && !l.addable ? f = 0 : _.value && l.addable && (l.size === "large" ? f = 49 : f = 40), f;
    });
    return (f, M) => {
      const z = ee("svg-icon");
      return n(), o("div", {
        class: $(["dk-tabs", `dk-is-tabs-${e.placement}`, `dk-tabs-size-${e.size}`])
      }, [
        _.value && e.placement === "top" ? (n(), o("div", {
          key: 0,
          onClick: L,
          class: $(["dk-tabs__left", e.theme === "card" ? "dk_btn-like--card" : ""])
        }, [
          R(z, { name: "icon-arrow-left" })
        ], 2)) : x("", !0),
        h("div", {
          ref_key: "tabsNavRef",
          ref: C,
          class: $(["dk-tabs-nav", e.theme === "card" ? "dk-tabs__nav--card" : ""])
        }, [
          h("div", {
            ref_key: "scrollRef",
            ref: w,
            class: "scroll-container"
          }, [
            (n(!0), o(Q, null, re(t.value, (D, y) => (n(), o("div", {
              class: $(["dk-tabs-nav-item", {
                "dk-tabs-nav-item-active": D.value === v.value,
                "dk-tabs-nav-item-disabled": D.disabled
              }]),
              ref_for: !0,
              ref: D.value === v.value ? (S) => g(S) : "",
              key: y,
              onClick: (S) => b(D, y)
            }, [
              h("div", ln, [
                R(z, {
                  name: D.labelIconName
                }, null, 8, ["name"]),
                h("span", tn, A(D.label), 1),
                h("span", {
                  onClick: ce((S) => H(D.value, y), ["stop"]),
                  style: { display: "inline-flex", "justify-content": "baseline", "align-items": "center" }
                }, [
                  D.removable ? (n(), ie(z, {
                    key: 0,
                    name: "icon-close"
                  })) : x("", !0)
                ], 8, an)
              ])
            ], 10, en))), 128))
          ], 512),
          e.theme !== "card" && e.placement !== "left" ? (n(), o("div", {
            key: 0,
            ref: "tabsBar",
            class: "dk-tabs__bar",
            style: Z({ width: m.value + "px", left: r.value + "px" })
          }, null, 4)) : x("", !0),
          e.theme !== "card" && e.placement === "left" ? (n(), o("div", {
            key: 1,
            ref: "tabsBar",
            class: "dk-tabs__bar",
            style: Z({ height: d.value + "px", top: u.value + "px" })
          }, null, 4)) : x("", !0)
        ], 2),
        _.value && e.placement === "top" ? (n(), o("div", {
          key: 1,
          class: $([
            "dk-tabs__right",
            e.theme === "card" ? "dk_btn-like--card" : ""
          ]),
          style: Z({ right: V.value + "px" }),
          onClick: N
        }, [
          R(z, { name: "icon-arrow-right" })
        ], 6)) : x("", !0),
        e.addable && e.placement === "top" ? (n(), o("div", {
          key: 2,
          class: $([
            "dk-tabs__add",
            e.theme === "card" ? "dk_btn-like--card" : "",
            _.value ? "dk_btn-clear__shadow" : ""
          ]),
          onClick: I
        }, [
          R(z, { name: "icon-add" })
        ], 2)) : x("", !0),
        J(f.$slots, "default")
      ], 2);
    };
  }
}), sn = /* @__PURE__ */ Object.assign({
  name: "DkTabPanel"
}, {
  __name: "dk-tab-panel",
  props: {
    label: {
      type: String,
      default: ""
    },
    value: {
      type: [String, Number],
      default: ""
    },
    disabled: {
      type: Boolean,
      default: !1
    },
    labelIconName: {
      type: String,
      default: ""
    },
    removable: {
      type: Boolean,
      default: !1
    }
  },
  setup(e) {
    const s = e, l = fe("tabsInfos");
    return l.setHeaderItem({
      label: s.label,
      value: s.value,
      disabled: s.disabled,
      labelIconName: s.labelIconName,
      removable: s.removable
    }), (t, a) => (n(), o("div", {
      class: $(["dk-tab-panel", e.value !== G(l).activeTabValue.value ? "dk-tab-panel-hidden" : ""])
    }, [
      J(t.$slots, "default")
    ], 2));
  }
}), on = /* @__PURE__ */ Object.assign({
  name: "DkCollapse"
}, {
  __name: "dk-collapse",
  props: {
    modelValue: {
      type: Array,
      default: []
    },
    onChange: {
      type: Function,
      default: () => {
      }
    },
    hiddenIcon: {
      type: Boolean,
      default: !1
    },
    expandMutex: {
      // 是否互斥
      type: Boolean,
      default: !1
    },
    expandIconPlacement: {
      type: String,
      default: "left"
    },
    borderless: {
      // 是否为无边框模式
      type: Boolean,
      default: !1
    },
    expandOnlyIcon: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: s }) {
    const l = e, t = i(l.modelValue), a = i(l.hiddenIcon), v = i(l.expandMutex), c = i(l.expandIconPlacement), m = i(l.borderless), d = i(l.expandOnlyIcon), r = s;
    return Oe("collapse", {
      modelValue: t,
      hiddenIcon: a,
      expandMutex: v,
      expandIconPlacement: c,
      borderless: m,
      expandOnlyIcon: d,
      updateModelValue: (b) => {
        t.value = b, r("update:modelValue", b), l.onChange && l.onChange(b);
      }
    }), (b, k) => (n(), o("div", {
      class: $(["dk-collapse", { "dk-collapse-borderless": m.value }])
    }, [
      J(b.$slots, "default")
    ], 2));
  }
}), un = { class: "dk-collapse-panel__wrapper" }, dn = /* @__PURE__ */ Object.assign({
  name: "DkCollapsePanel"
}, {
  __name: "dk-collapse-panel",
  props: {
    header: {
      type: [String, Function],
      default: void 0
    },
    value: {
      // 必需。当前面板唯一标识，如果值为空则取当前面下标兜底作为唯一标识
      type: [String, Number],
      required: !0
    },
    disabled: {
      type: Boolean,
      default: !1
    }
  },
  setup(e) {
    const s = e, l = fe("collapse"), t = i(null), a = (r, u) => {
      s.disabled || l.expandOnlyIcon.value || (console.log("handleClick", l.modelValue.value.includes(u)), l.modelValue.value.includes(u) ? (t.value.classList.add("dk-collapse-panel-body-hide"), t.value.classList.remove("dk-collapse-panel-body-show"), l.expandMutex.value ? (l.modelValue.value = [], l.modelValue.value = [...l.modelValue.value], l.updateModelValue(l.modelValue.value)) : (l.modelValue.value = l.modelValue.value.filter((b) => b !== u), l.modelValue.value = [...l.modelValue.value], l.updateModelValue(l.modelValue.value))) : (t.value.classList.add("dk-collapse-panel-body-show"), t.value.classList.remove("dk-collapse-panel-body-hide"), l.expandMutex.value ? (l.modelValue.value = [u], l.modelValue.value = [...l.modelValue.value], l.updateModelValue(l.modelValue.value)) : (l.modelValue.value.push(u), l.modelValue.value = [...l.modelValue.value], l.updateModelValue(l.modelValue.value))));
    }, v = (r) => {
      s.disabled || (l.modelValue.value.includes(r) ? (t.value.classList.add("dk-collapse-panel-body-hide"), t.value.classList.remove("dk-collapse-panel-body-show"), l.expandMutex.value ? (l.modelValue.value = [], l.modelValue.value = [...l.modelValue.value], l.updateModelValue(l.modelValue.value)) : (l.modelValue.value = l.modelValue.value.filter((u) => u !== r), l.modelValue.value = [...l.modelValue.value], l.updateModelValue(l.modelValue.value))) : (t.value.classList.add("dk-collapse-panel-body-show"), t.value.classList.remove("dk-collapse-panel-body-hide"), l.expandMutex.value ? (l.modelValue.value = [r], l.modelValue.value = [...l.modelValue.value], l.updateModelValue(l.modelValue.value)) : (l.modelValue.value.push(r), l.modelValue.value = [...l.modelValue.value], l.updateModelValue(l.modelValue.value))));
    }, c = X(() => l.modelValue.value.includes(s.value)), m = Se(), d = X(() => {
      var r, u;
      return ((r = m.expandIcon) == null ? void 0 : r.call(m)) && ((u = m.expandIcon) == null ? void 0 : u.call(m).length) > 0;
    });
    return (r, u) => {
      const b = ee("svg-icon");
      return n(), o("div", {
        class: $(["dk-collapse-panel", { "is-borderless": G(l).borderless.value }])
      }, [
        h("div", un, [
          h("div", {
            class: $(["dk-collapse-panel__header", {
              "is-disabled": e.disabled,
              "is-hidden-icon": G(l).hiddenIcon.value
            }]),
            style: Z({ cursor: G(l).expandOnlyIcon.value ? "default" : "pointer" }),
            onClick: u[3] || (u[3] = (k) => a(k, e.value))
          }, [
            G(l).expandIconPlacement.value === "left" ? (n(), o("span", {
              key: 0,
              class: $(["dk-collapse-icon-wrapper", { "is-collapse-expand": c.value }]),
              onClick: u[0] || (u[0] = ce((k) => v(e.value), ["stop"]))
            }, [
              !G(l).hiddenIcon.value && !d.value ? (n(), ie(b, {
                key: 0,
                color: e.disabled ? "rgba(0, 0, 0, 0.26)" : "",
                name: c.value ? "icon-chevron-down" : "icon-arrow-right"
              }, null, 8, ["color", "name"])) : x("", !0),
              !G(l).hiddenIcon.value && d.value ? J(r.$slots, "expandIcon", { key: 1 }) : x("", !0)
            ], 2)) : x("", !0),
            be(" " + A(e.header) + " ", 1),
            J(r.$slots, "header"),
            h("div", {
              class: "dk-collapse-panel-header-right-content",
              onClick: u[1] || (u[1] = ce(() => {
              }, ["stop"]))
            }, [
              J(r.$slots, "headerRightContent")
            ]),
            G(l).expandIconPlacement.value === "right" ? (n(), o("span", {
              key: 1,
              class: "dk-collapse-icon-wrapper",
              onClick: u[2] || (u[2] = ce((k) => v(e.value), ["stop"]))
            }, [
              !G(l).hiddenIcon.value && !d.value ? (n(), ie(b, {
                key: 0,
                color: e.disabled ? "rgba(0, 0, 0, 0.26)" : "",
                name: c.value ? "icon-chevron-down" : "icon-arrow-right"
              }, null, 8, ["color", "name"])) : x("", !0),
              !G(l).hiddenIcon.value && d.value ? J(r.$slots, "expandIcon", { key: 1 }) : x("", !0)
            ])) : x("", !0)
          ], 6),
          h("div", {
            ref_key: "panelBody",
            ref: t,
            class: $([
              "dk-collapse-panel__body",
              {
                "dk-collapse-panel-body-show": c.value,
                "dk-collapse-panel-body-hide": !c.value
              }
            ])
          }, [
            h("div", {
              class: $([
                "dk-collapse-panel__content",
                { "dk-collapse__content-padding": G(l).hiddenIcon.value || G(l).expandIconPlacement.value === "right" }
              ])
            }, [
              J(r.$slots, "default")
            ], 2)
          ], 2)
        ])
      ], 2);
    };
  }
}), cn = { class: "dk-dialog__header" }, rn = { class: "header-content" }, vn = { class: "title" }, fn = { class: "dk-dialog__footer" }, hn = /* @__PURE__ */ Object.assign({
  name: "DkDialog"
}, {
  __name: "dk-dialog",
  props: {
    // modelValue: {
    //   type: [Boolean, String, Number],
    //   default: undefined
    // },
    visible: {
      type: Boolean,
      default: !1
    },
    title: {
      type: String,
      default: "标题"
    },
    width: {
      type: String,
      default: "50%"
    },
    cancelButtonText: {
      type: String,
      default: "取消"
    },
    confirmButtonText: {
      type: String,
      default: "确定"
    },
    onClose: {
      type: Function,
      default: () => {
      }
    },
    onCancel: {
      type: Function,
      default: () => {
      }
    },
    onConfirm: {
      type: Function,
      default: () => {
      }
    },
    showDivider: {
      type: Boolean,
      default: !1
    },
    fullScreen: {
      type: Boolean,
      default: !1
    },
    closeOnClickModal: {
      type: Boolean,
      default: !0
    },
    onModal: {
      type: Function,
      default: () => {
      }
    },
    onBeforeClose: {
      type: Function,
      default: () => {
      }
    },
    showClose: {
      type: Boolean,
      default: !0
    }
  },
  emits: ["update:visible", "close"],
  setup(e, { emit: s }) {
    const l = e, t = s, a = (_) => {
      l.onBeforeClose(), window.removeEventListener("resize", d), l.onClose(_), t("update:visible", !1);
    }, v = (_) => {
      l.onBeforeClose(), window.removeEventListener("resize", d), t("update:visible", !1), l.onCancel(_);
    }, c = (_) => {
      l.closeOnClickModal && (l.onBeforeClose(), window.removeEventListener("resize", d), t("update:visible", !1), l.onModal(_));
    }, m = (_) => {
      l.onConfirm(_);
    }, d = () => {
      const _ = document.querySelector(".dk-dialog").offsetHeight, C = document.querySelector(".dk-dialog__header").offsetHeight, w = document.querySelector(".dk-dialog__footer").offsetHeight, I = _ - C - w;
      u.value = `${I}px`;
    }, r = i(!1);
    se(() => l.visible, (_) => {
      _ ? (r.value = l.showDivider, document.body.style.overflow = "hidden", b(), window.addEventListener("resize", d)) : document.body.style.overflow = "auto";
    });
    const u = i(""), b = () => {
      oe(() => {
        const _ = document.querySelector(".dk-dialog").offsetHeight, C = document.querySelector(".dk-dialog__header").offsetHeight, w = document.querySelector(".dk-dialog__footer").offsetHeight, I = _ - C - w;
        u.value = `${I}px`;
      });
    }, k = i(null), g = i(null);
    return Oe("dialogBodyRef", k), Oe("dialogRef", g), (_, C) => {
      const w = ee("svg-icon"), I = ee("dk-button");
      return e.visible ? (n(), o("div", {
        key: 0,
        class: "dk-dialog__wrapper",
        onMousedown: c
      }, [
        h("div", {
          ref_key: "dialogRef",
          ref: g,
          onMousedown: C[0] || (C[0] = ce(() => {
          }, ["stop"])),
          class: $([
            "dk-dialog",
            r.value ? "dk-dialog--divider" : "",
            e.fullScreen ? "dk-dialog--fullscreen" : ""
          ]),
          style: Z({ width: e.width })
        }, [
          h("div", cn, [
            h("div", rn, [
              h("span", vn, [
                Se().header ? J(_.$slots, "header", { key: 0 }) : (n(), o(Q, { key: 1 }, [
                  be(A(e.title), 1)
                ], 64))
              ]),
              e.showClose ? (n(), o("span", {
                key: 0,
                class: "close",
                onClick: a
              }, [
                R(w, { name: "icon-messageclear" })
              ])) : x("", !0)
            ])
          ]),
          h("div", {
            class: "dk-dialog__body",
            ref_key: "dialogBodyRef",
            ref: k,
            style: Z({ height: e.fullScreen ? u.value : "" })
          }, [
            J(_.$slots, "default")
          ], 4),
          h("div", fn, [
            Se().footer ? J(_.$slots, "footer", { key: 0 }) : (n(), o(Q, { key: 1 }, [
              R(I, {
                type: "text",
                onClick: v
              }, {
                default: we(() => [
                  be(A(e.cancelButtonText), 1)
                ]),
                _: 1
              }),
              R(I, {
                type: "primary",
                onClick: m
              }, {
                default: we(() => [
                  be(A(e.confirmButtonText), 1)
                ]),
                _: 1
              })
            ], 64))
          ])
        ], 38)
      ], 32)) : x("", !0);
    };
  }
}), pn = {
  key: 1,
  class: "expand-icon dk-table-header-cell",
  style: { "background-color": "#FAFAFA" }
}, mn = {
  key: 0,
  class: "dk-table-checkbox"
}, gn = { class: "dk-table__cell--title" }, kn = ["onClick"], yn = { class: "icon-up" }, bn = { class: "icon-down" }, _n = ["onClick"], xn = {
  key: 0,
  class: "filter-wrapper"
}, wn = /* @__PURE__ */ h("span", { class: "dk-table-controller" }, null, -1), $n = [
  wn
], Cn = {
  key: 1,
  class: "expand-icon dk-table-body-cell"
}, Sn = ["onClick"], Vn = ["onMouseenter", "onMouseleave"], zn = {
  key: 2,
  class: "dk-table-loading"
}, Mn = {
  key: 3,
  class: "dk-table-empty"
}, Dn = /* @__PURE__ */ h("div", { class: "texet" }, "请选择需要在表格中显示的数据列", -1), Bn = { class: "checkbox-content" }, Ln = { class: "all-checkbox" }, In = { class: "checkbox-group" }, Nn = /* @__PURE__ */ Object.assign({
  name: "DkTable"
}, {
  __name: "dk-table",
  props: {
    data: {
      type: Array,
      default: []
    },
    columns: {
      type: Array,
      default: []
    },
    height: {
      type: String,
      default: "auto"
    },
    rowClassName: {
      type: Function,
      default: () => ""
    },
    headerCellClassName: {
      type: Function,
      default: () => ""
    },
    rowKey: {
      type: String,
      default: ""
    },
    bordered: {
      type: Boolean,
      default: !1
    },
    onSelectChange: {
      type: Function,
      default: () => {
      }
    },
    loading: {
      type: Boolean,
      default: !1
    },
    emptyText: {
      type: String,
      default: "暂无数据"
    },
    columnController: {
      type: Object,
      default: {}
    },
    filterText: {
      type: String,
      default: ""
    },
    onClearFilter: {
      type: Function,
      default: () => {
      }
    },
    headerAffixedTop: {
      type: Boolean,
      default: !1
    }
  },
  setup(e, { expose: s }) {
    const l = e, t = i(null), a = (F) => {
      F && (t.value = F);
    }, v = i(null), c = i(null), m = i(null), d = i(null), r = (F, Y) => {
      F.target.classList.value.indexOf("set-ellipsis-text") !== -1 && (v.value = F.target.offsetWidth < F.target.scrollWidth, c.value = F.target.innerText, m.value = F.target.offsetHeight + 16, d.value = Y), F.target.classList.value.indexOf("set-ellipsis-multi-line-text") !== -1 && (v.value = F.target.offsetHeight < F.target.scrollHeight, c.value = F.target.innerText, m.value = F.target.offsetHeight + 16, d.value = Y);
    }, u = (F) => {
      v.value = !1;
    }, b = i(0), k = i(0), g = i(0), _ = (F) => {
      b.value = F.target.scrollLeft, k.value = F.target.scrollWidth - F.target.clientWidth - b.value, g.value = F.target.scrollTop;
    }, C = i("auto");
    se(() => l.height, (F, Y) => {
      l.headerAffixedTop ? oe(() => {
        w.value && (C.value = w.value.offsetHeight - I.value.offsetHeight - (l.bordered ? 2 : 0), L());
      }) : C.value = "atuo";
    });
    const w = i(null), I = i(null), H = i(null);
    De(() => {
      let F = w.value;
      F.offsetWidth < F.scrollWidth && (k.value = F.scrollWidth - F.clientWidth), window.addEventListener("resize", L), oe(() => {
        L();
      });
    }), je(() => {
      window.removeEventListener("resize", L);
    });
    const L = () => {
      w.value && oe(() => {
        let Y = w.value.scrollHeight > w.value.clientHeight ? w.value.offsetHeight - w.value.clientHeight : 0;
        l.headerAffixedTop && (C.value = C.value - Y);
      });
    }, N = (F, Y) => {
      const ve = `expand-svg-icon--level_${Y}`, he = document.getElementsByClassName(ve)[0];
      if (he.classList.value.includes("is-expanded")) {
        he.classList.remove("is-expanded");
        const ye = `dk-expand--level-${Y}`, Ie = document.getElementsByClassName(ye)[0];
        Ie && Ie.classList.remove("is-show");
      } else {
        he.classList.add("is-expanded");
        const ye = `dk-expand--level-${Y}`, Ie = document.getElementsByClassName(ye)[0];
        Ie && Ie.classList.add("is-show");
      }
    }, V = i([]), f = i([]), M = i([]), z = i(l.data);
    se(() => l.data, (F, Y) => {
      z.value = F;
      const ve = document.getElementsByClassName("dk-table-expand-row");
      for (let ye = 0; ye < ve.length; ye++)
        ve[ye].classList.remove("is-show");
      const he = document.getElementsByClassName("expand-svg-icon--level");
      for (let ye = 0; ye < he.length; ye++)
        he[ye].classList.remove("is-expanded");
      V.value = [], f.value = [], M.value = [], l.onSelectChange(V.value, f.value), oe(() => {
        ae();
      });
    }, {
      immediate: !0,
      deep: !0
    });
    const D = (F, Y) => {
      if (Y !== void 0)
        return Y.disabled && M.value.push(F[l.rowKey]), Y.disabled;
    }, y = (F, Y) => {
      F ? (V.value.push(Y[l.rowKey]), f.value.push(Y)) : (V.value = [...V.value].filter((ve) => ve !== Y[l.rowKey]), f.value = f.value.filter((ve) => ve[l.rowKey] !== Y[l.rowKey])), l.onSelectChange(V.value, f.value);
    }, S = X(() => V.value.length === z.value.length - [...new Set(M.value)].length && V.value.length > 0), T = X(() => l.data.length - [...new Set(M.value)].length > V.value.length && V.value.length !== 0), $e = (F) => {
      if (F) {
        let Y = l.data.map((ve) => ve[l.rowKey]);
        V.value = Y.filter((ve) => !M.value.includes(ve)), f.value = l.data;
      } else
        V.value = [], f.value = [];
      l.onSelectChange(V.value, f.value);
    }, U = i(!1), xe = i(""), _e = (F, Y) => {
      F && (xe.value !== Y && (xe.value = Y, U.value = !1), U.value ? z.value.reverse() : (U.value = !0, z.value.sort(F)));
    }, le = i([]), Re = We([]), Me = i(!1), O = We([]), te = () => {
      O.value = [...le.value], Me.value = !0;
    }, ue = () => {
      le.value = [...O.value], Me.value = !1;
    }, ae = () => {
      if (l.columnController && l.columnController.fields) {
        const F = [...l.columnController.fields], Y = [...le.value];
        let ve = F.filter((he) => Y.indexOf(he) === -1);
        ne(ve, "none"), ne(le.value, "flex");
      }
      Me.value = !1;
    }, ne = (F, Y) => {
      let ve = I.value.children, he = H.value.children;
      F.forEach((ye) => {
        let Ie = `dk-table-header__${ye}`, B = `dk-table-body__${ye}`;
        for (let p = 0; p < ve.length; p++)
          ve[p].classList.value.indexOf(Ie) !== -1 && (ve[p].style.display = Y);
        for (let p = 0; p < he.length; p++)
          for (let W = 0; W < he[p].children.length; W++)
            he[p].children[W].classList.value.indexOf(B) !== -1 && (he[p].children[W].style.display = Y);
      });
    }, j = i("");
    De(() => {
      var Y;
      if (l.columnController && l.columnController.fields) {
        const ve = l.columnController.fields;
        for (let he = 0; he < ve.length; he++) {
          let ye = {
            checked: !0,
            label: (Y = l.columns.filter((Ie) => Ie.colKey === ve[he])[0]) == null ? void 0 : Y.title,
            value: ve[he]
          };
          Re.push(ye), le.value.push(ve[he]);
        }
      }
      let F = K(w.value);
      console.log("size", F), console.log("dkTable.value", w.value.offsetWidth), j.value = F + w.value.offsetWidth + "px";
    });
    function K(F) {
      const Y = F.getBoundingClientRect();
      return F.scrollWidth - Y.width;
    }
    const me = (F) => {
      let Y = [...l.columnController.fields];
      le.value = F ? Y : [];
    }, Be = X(() => l.columnController.fields.length === le.value.length), Le = X(() => l.columnController.fields.length > le.value.length && le.value.length !== 0), pe = i(0), ge = i(""), Ae = i(!1), P = i(0), de = i(""), ke = (F, Y) => {
      P.value = Y.width, ge.value = Y.slotName, de.value = Y.className, Ae.value = !0, pe.value = F.clientX - w.value.offsetLeft - F.offsetX - Y.width;
    }, ze = () => {
      Ae.value = !1;
    }, Ne = () => {
      Ae.value = !1;
    }, He = () => {
      l.onClearFilter();
    };
    return s({
      closeFilter: Ne
    }), Oe("dkTable", w), (F, Y) => {
      const ve = ee("dk-button"), he = ee("svg-icon"), ye = ee("dk-checkbox"), Ie = ee("dk-checkbox-group"), B = ee("dk-dialog");
      return n(), o("div", { onClick: ze }, [
        e.columnController.fields && e.columnController.type === "out-table" ? (n(), o("div", {
          key: 0,
          class: "dk-table-config",
          style: Z({ textAlign: e.columnController.position ? e.columnController.position : "right" })
        }, [
          R(ve, {
            icon: "icon-setting",
            onClick: te
          }, {
            default: we(() => [
              be("配置列")
            ]),
            _: 1
          })
        ], 4)) : x("", !0),
        h("div", {
          class: $(["dk-table", e.bordered ? "dk-table--bordered" : ""]),
          ref_key: "dkTable",
          ref: w,
          style: Z({ width: "100%", height: e.height }),
          onScroll: _
        }, [
          h("div", {
            ref_key: "dkTableHeader",
            ref: I,
            class: $([
              "dk-table__header-wrapper",
              e.headerAffixedTop ? "dk-atble__header--sticky" : "dk-atble__header--default"
            ])
          }, [
            e.columnController.fields && e.columnController.type === "in-table" ? (n(), o("div", {
              key: 0,
              class: "controller-box dk-table-header-cell",
              style: Z({ "background-color": "#FAFAFA", width: e.columnController.controWidth + "px", minWidth: e.columnController.controWidth + "px" })
            }, [
              h("span", { onClick: te }, [
                R(he, {
                  name: e.columnController.controllerIcon ? e.columnController.controllerIcon : "icon-filter"
                }, null, 8, ["name"])
              ])
            ], 4)) : x("", !0),
            Se().expandRow ? (n(), o("div", pn)) : x("", !0),
            (n(!0), o(Q, null, re(e.columns, (p, W) => (n(), o("div", {
              key: W,
              class: $([
                "dk-table-header-cell",
                `dk-table-header__${p.align ? p.align : "left"}`,
                `dk-table-header__${p.colKey}`,
                p.width ? "set-cell-width" : "set-cell-width_flex",
                p.fixed ? `set-cell-fixed__${p.fixed}` : "",
                p.fixed && p.fixed == "left" && b.value !== 0 ? "fixed-scroll-right-border" : "",
                p.fixed && p.fixed == "right" && k.value !== 0 ? "fixed-scroll-left-border" : "",
                e.headerCellClassName({ cell: p, headIndex: W })
              ]),
              style: Z({ width: p.width ? p.width + "px" : "", minWidth: p.minWidth ? p.minWidth + "px" : "" })
            }, [
              p.type === "multiple" ? (n(), o("span", mn, [
                R(ye, {
                  checked: S.value,
                  indeterminate: T.value,
                  "on-change": $e
                }, null, 8, ["checked", "indeterminate"])
              ])) : (n(), o("div", {
                key: 1,
                style: { display: "flex" },
                class: $([p.align ? `dk-table__cell--${p.align}` : "dk-table__cell--left"])
              }, [
                h("div", gn, A(p.title), 1),
                p.sorter ? (n(), o("div", {
                  key: 0,
                  class: "dk-table__filter-icon-wrap",
                  onClick: (E) => _e(p.sorter, p.colKey)
                }, [
                  h("div", yn, [
                    R(he, {
                      name: "icon-chevron-up",
                      color: "rgba(0, 0, 0, 0.40)"
                    })
                  ]),
                  h("div", bn, [
                    R(he, {
                      name: "icon-chevron-down",
                      color: "rgba(0, 0, 0, 0.40)"
                    })
                  ])
                ], 8, kn)) : x("", !0),
                p.filter && p.filter.slotName ? (n(), o("div", {
                  key: 1,
                  class: "dk-table__filter-slot-wrap",
                  onClick: ce((E) => ke(E, p.filter), ["stop"])
                }, [
                  R(he, { name: "icon-filter" })
                ], 8, _n)) : x("", !0)
              ], 2))
            ], 6))), 128))
          ], 2),
          h("div", {
            ref_key: "dkTableBody",
            ref: H,
            style: Z({ height: C.value + "px" }),
            class: "dk-tabale__body-wrapper"
          }, [
            e.filterText.length > 0 ? (n(), o("div", xn, [
              be(' 搜索"' + A(e.filterText) + '",找到' + A(z.value.length) + "条结果 ", 1),
              R(ve, {
                type: "textPrimary",
                onClick: He
              }, {
                default: we(() => [
                  be("清空筛选")
                ]),
                _: 1
              })
            ])) : x("", !0),
            z.value.length && !e.loading ? (n(!0), o(Q, { key: 1 }, re(z.value, (p, W) => (n(), o(Q, { key: W }, [
              h("div", {
                class: $(["dk-table-row", e.rowClassName({ row: p, rowIndex: W })])
              }, [
                e.columnController.fields && e.columnController.type === "in-table" ? (n(), o("div", {
                  key: 0,
                  class: "controller-box dk-table-body-cell",
                  style: Z({ width: e.columnController.controWidth + "px", minWidth: e.columnController.controWidth + "px" })
                }, $n, 4)) : x("", !0),
                Se().expandRow ? (n(), o("div", Cn, [
                  h("div", {
                    class: $(["expand-svg-icon--level", `expand-svg-icon--level_${W}`]),
                    onClick: (E) => N(E, W)
                  }, [
                    R(he, { name: "icon-chevron-circle-right" })
                  ], 10, Sn)
                ])) : x("", !0),
                (n(!0), o(Q, null, re(e.columns, (E, Ce) => (n(), o("div", {
                  class: $([
                    "dk-table-body-cell",
                    `dk-table-body__${E.colKey}`,
                    `dk-table_columns-cell_${Ce}`,
                    E.width ? "set-cell-width" : "set-cell-width_flex",
                    E.fixed ? `set-cell-fixed__${E.fixed}` : "",
                    E.fixed && E.fixed == "left" && b.value !== 0 ? "fixed-scroll-right-border" : "",
                    E.fixed && E.fixed == "right" && k.value !== 0 ? "fixed-scroll-left-border" : "",
                    E.cellClassName ? E.cellClassName({ row: p, rowIndex: W }) : ""
                  ]),
                  ref_for: !0,
                  ref: E.ellipsis ? "rowCell" : "",
                  key: Ce,
                  style: Z({ width: E.width ? E.width + "px" : "", minWidth: E.minWidth ? E.minWidth + "px" : "", textAlign: E.align ? E.align : "" })
                }, [
                  E.colKey === "row-select" ? (n(), o("span", {
                    key: 0,
                    class: "dk-table-checkbox",
                    style: Z({ width: E.width ? E.width + "px" : "" })
                  }, [
                    R(ye, {
                      "on-change": y,
                      checked: V.value.includes(p[e.rowKey]),
                      value: p,
                      disabled: D(p, E.checkProps ? E.checkProps({ row: p, rowIndex: W }) : void 0)
                    }, null, 8, ["checked", "value", "disabled"])
                  ], 4)) : x("", !0),
                  p[E.colKey] !== null && p[E.colKey] !== void 0 && E.colKey !== "row-select" ? (n(), o(Q, { key: 1 }, [
                    Ve(h("span", {
                      class: "textTip",
                      style: Z({ width: E.width ? E.width + "px" : "", bottom: m.value + "px" })
                    }, A(p[E.colKey]), 5), [
                      [Te, v.value && c.value == p[E.colKey] && d.value == W]
                    ]),
                    h("span", {
                      ref_for: !0,
                      ref: E.ellipsis ? (Pe) => a(Pe) : "",
                      onMouseenter: (Pe) => r(Pe, W),
                      onMouseleave: (Pe) => u(),
                      class: $(["cell", E.ellipsis ? "set-ellipsis-text" : "", E.ellipsisMultiLine ? "set-ellipsis-multi-line-text" : ""])
                    }, [
                      E.cell ? (n(), o(Q, { key: 0 }, [
                        be(A(E.cell({ row: p, rowIndex: W })), 1)
                      ], 64)) : (n(), o(Q, { key: 1 }, [
                        be(A(p[E.colKey]), 1)
                      ], 64))
                    ], 42, Vn)
                  ], 64)) : x("", !0),
                  (p[E.colKey] == null || p[E.colKey] == null) && E.colKey !== "row-select" ? (n(), o("span", {
                    key: 2,
                    class: $([
                      "cell",
                      E.ellipsis ? "set-ellipsis-text" : ""
                    ])
                  }, [
                    J(F.$slots, E.colKey, { row: p })
                  ], 2)) : x("", !0)
                ], 6))), 128))
              ], 2),
              Se().expandRow ? (n(), o("div", {
                key: 0,
                class: $(["dk-table-expand-row", `dk-expand--level-${W}`]),
                style: Z({ width: j.value })
              }, [
                J(F.$slots, "expandRow", {
                  row: p,
                  index: W
                })
              ], 6)) : x("", !0)
            ], 64))), 128)) : x("", !0),
            e.loading ? (n(), o("div", zn, [
              Se().loading ? J(F.$slots, "loading", { key: 0 }) : (n(), o(Q, { key: 1 }, [
                be(" 正在加载中，请稍等 ")
              ], 64))
            ])) : x("", !0),
            z.value.length === 0 && !e.loading ? (n(), o("div", Mn, [
              Se().empty ? J(F.$slots, "empty", { key: 0 }) : (n(), o(Q, { key: 1 }, [
                be(A(e.emptyText), 1)
              ], 64))
            ])) : x("", !0)
          ], 4),
          Ae.value ? (n(), o("div", {
            key: 0,
            onClick: Y[0] || (Y[0] = ce(() => {
            }, ["stop"])),
            class: $(["dk-table__filter-slot", de.value]),
            style: Z({ left: pe.value + "px", top: g.value + 45 + "px", width: P.value + "px" })
          }, [
            J(F.$slots, ge.value)
          ], 6)) : x("", !0)
        ], 38),
        R(B, {
          visible: Me.value,
          "onUpdate:visible": Y[2] || (Y[2] = (p) => Me.value = p),
          title: "自定义设置表格列",
          width: "608px",
          "cancel-button-text": "取消",
          "confirm-button-text": "确定",
          "on-before-close": ue,
          "on-confirm": ae,
          showDivider: !1,
          "full-screen": !1,
          "close-on-clidk-modal": !0,
          class: "dialog-conten_table"
        }, {
          default: we(() => [
            h("div", null, [
              Dn,
              h("div", Bn, [
                h("div", Ln, [
                  R(ye, {
                    checked: Be.value,
                    indeterminate: Le.value,
                    "on-change": me
                  }, {
                    default: we(() => [
                      be("全选 ")
                    ]),
                    _: 1
                  }, 8, ["checked", "indeterminate"])
                ]),
                h("div", In, [
                  R(Ie, {
                    modelValue: le.value,
                    "onUpdate:modelValue": Y[1] || (Y[1] = (p) => le.value = p),
                    options: Re
                  }, null, 8, ["modelValue", "options"])
                ])
              ])
            ])
          ]),
          _: 1
        }, 8, ["visible"])
      ]);
    };
  }
}), Tn = /* @__PURE__ */ Object.assign({
  name: "DkList"
}, {
  __name: "dk-list",
  props: {
    size: {
      type: String,
      default: "medium"
      // small/medium/large
    },
    split: {
      type: Boolean,
      default: !1
    },
    stripe: {
      type: Boolean,
      default: !1
    }
  },
  setup(e) {
    const s = e, l = i(s.size), t = i(s.split);
    return Oe("listProvider", {
      size: l,
      split: t
    }), (a, v) => (n(), o("div", {
      class: $(["dk-list", e.stripe ? "dk-list--stripe" : ""])
    }, [
      J(a.$slots, "default")
    ], 2));
  }
}), Rn = { class: "dk-list-item__main" }, An = { class: "dk-list-item__action" }, On = /* @__PURE__ */ Object.assign({
  name: "DkListItem"
}, {
  __name: "dk-list-item",
  props: {},
  setup(e) {
    const s = fe("listProvider");
    return (l, t) => (n(), o("div", {
      class: $([
        "dk-list-item",
        `dk-list-size-${G(s).size.value}`,
        G(s).split.value ? "dk-list-item--split" : ""
      ])
    }, [
      h("div", Rn, [
        J(l.$slots, "default")
      ]),
      h("div", An, [
        J(l.$slots, "action")
      ])
    ], 2));
  }
}), Pn = { class: "dk-list-item-meta" }, Hn = {
  key: 0,
  class: "dk-list-item__meta-avatar"
}, Fn = ["src"], En = { class: "dk-list-item__meta-content" }, Wn = { class: "dk-list-item__meta-title" }, jn = { class: "dk-list-item__meta-description" }, Kn = /* @__PURE__ */ Object.assign({
  name: "DkListItemMeta"
}, {
  __name: "dk-list-item-meta",
  props: {
    title: {
      type: String,
      default: ""
    },
    description: {
      type: String,
      default: ""
    },
    image: {
      type: String,
      default: ""
    }
  },
  setup(e) {
    return (s, l) => (n(), o("div", Pn, [
      e.image ? (n(), o("div", Hn, [
        h("img", { src: e.image }, null, 8, Fn)
      ])) : x("", !0),
      h("div", En, [
        h("div", Wn, A(e.title), 1),
        h("div", jn, A(e.description), 1)
      ])
    ]));
  }
}), Yn = {
  key: 0,
  class: "dk-tag__icon"
}, qn = { class: "dk-tag__content" }, Un = /* @__PURE__ */ Object.assign({
  name: "DkTag"
}, {
  __name: "dk-tag",
  props: {
    value: {
      type: [String, Number, Object, Array],
      default: void 0
    },
    theme: {
      // default/primary/warning/danger/success
      type: String,
      default: "default"
    },
    variant: {
      // dark/light/outline/light-outline
      type: String,
      default: "dark"
    },
    size: {
      // small/medium/large
      type: String,
      default: "medium"
    },
    shape: {
      // square/round/mark
      type: String,
      default: "square"
    },
    maxWidth: {
      type: String,
      default: "auto"
    },
    closable: {
      type: Boolean,
      default: !1
    },
    close: {
      type: Function,
      default: () => {
      }
    },
    disabled: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["close"],
  setup(e, { emit: s }) {
    const l = e, t = s, a = () => {
      l.disabled || t("close");
    };
    return (v, c) => {
      const m = ee("svg-icon");
      return n(), o("div", {
        class: $([
          "dk-tag",
          `dk-tag--${e.theme}`,
          `dk-tag--${e.variant}`,
          `dk-tag--${e.size}`,
          `dk-tag--${e.shape}`,
          e.disabled ? "dk-tag--disabled" : ""
        ]),
        style: Z({ maxWidth: e.maxWidth })
      }, [
        Se().icon ? (n(), o("span", Yn, [
          J(v.$slots, "icon")
        ])) : x("", !0),
        h("span", qn, [
          J(v.$slots, "default")
        ]),
        e.closable ? (n(), o("span", {
          key: 1,
          class: "dk-tag__close",
          onClick: ce(a, ["stop"])
        }, [
          R(m, {
            name: "icon-close",
            size: e.size === "large" ? "16px" : "14px"
          }, null, 8, ["size"])
        ])) : x("", !0)
      ], 6);
    };
  }
}), Gn = /* @__PURE__ */ Object.assign({
  name: "DkCheckTag"
}, {
  __name: "dk-check-tag",
  props: {
    theme: {
      //primary/warning/danger/success
      type: String,
      default: "primary"
    },
    checked: {
      type: Boolean,
      default: !1
    },
    size: {
      // small/medium/large
      type: String,
      default: "medium"
    },
    onChange: {
      type: Function,
      default: () => {
      }
    }
  },
  emits: ["update:checked"],
  setup(e, { emit: s }) {
    const l = e, t = i(l.checked), a = () => {
      t.value = !t.value, l.onChange(t.value);
    };
    return (v, c) => (n(), o("div", {
      class: $([
        "dk-tag--check",
        t.value ? "dk-tag-is-checked" : "",
        `dk-tag--${e.size}`,
        `dk-tag--${e.theme}`
      ]),
      onClick: a
    }, [
      J(v.$slots, "default")
    ], 2));
  }
}), Jn = {
  class: /* @__PURE__ */ $(["dk-dropdown-popup"])
}, Xn = ["onClick"], Qn = {
  key: 0,
  class: "dk-dropdown__prefix-icon"
}, Zn = { class: "dk-dropdown__item-text" }, es = {
  key: 1,
  class: "dk-dropdown__suffix-icon"
}, ls = ["onClick"], ts = ["onMouseenter"], as = {
  key: 0,
  class: "dk-dropdown__prefix-icon"
}, ns = { class: "dk-dropdown__item-text" }, ss = { class: "dk-dropdown__suffix-icon" }, os = {
  key: 1,
  class: "dk-dropdown__divider"
}, is = /* @__PURE__ */ Object.assign({
  name: "DkDropdown"
}, {
  __name: "dk-dropdown",
  props: {
    trigger: {
      type: String,
      default: "hover"
      // hover, click
    },
    options: {
      type: Array,
      default: []
    },
    popupRight: {
      // 使用无需配置这个
      type: Boolean,
      default: !1
    },
    popupMinWidth: {
      type: String,
      default: "160px"
    }
  },
  emits: ["click", "closeParentDropdown"],
  setup(e, { expose: s, emit: l }) {
    const t = e, a = i(!1), v = i(null), c = i(0), m = i(0), d = i(0);
    i(null);
    const r = (y) => {
      c.value = y.target.offsetWidth, m.value = -y.target.offsetHeight, t.trigger === "hover" && (a.value = !0);
    }, u = () => {
      t.trigger === "hover" && (a.value = !1, H.value = void 0);
    }, b = (y, S) => {
      t.trigger === "click" && (a.value = !0);
    }, k = i(null), g = l, _ = (y, S) => {
      y.disabled || (t.trigger === "hover" && (C.value = !1, a.value = !1, g("click", y, S)), t.trigger === "click" && (y && y.children && y.children.length > 0 ? (C.value = !0, H.value = y.value, a.value = !0, k.value.forEach((T) => {
        JSON.stringify(y.children) === T.getOptions() || (console.log("其余关闭"), T.closeAllDropdowns(), T.closeDropdown());
      })) : (z(y, S), a.value = !1, H.value = void 0, k.value.forEach((T) => {
        T.closeAllDropdowns();
      }), g("closeParentDropdown"))));
    }, C = i(!1), w = (y) => {
      t.trigger === "hover" && (C.value = !0);
    }, I = () => {
      t.trigger === "hover" && (C.value = !1);
    }, H = i(void 0), L = (y, S) => {
      t.trigger === "hover" && (H.value = S.value);
    }, N = (y) => {
      v.value.contains(y.target) || (a.value = !1, H.value = void 0);
    };
    De(() => {
      document.addEventListener("mousedown", N);
    }), je(() => {
      document.removeEventListener("mousedown", N);
    });
    const V = () => {
      a.value = !1, H.value = void 0;
    }, f = () => {
      a.value = !1, H.value = void 0, g("closeParentDropdown");
    }, M = () => {
      var y;
      a.value = !1, H.value = void 0, (y = k.value) == null || y.forEach((S) => {
        S.closeDropdown();
      });
    }, z = (y, S) => {
      a.value = !1, H.value = void 0, g("click", y, S);
    };
    return s({
      closeDropdown: V,
      getOptions: () => JSON.stringify(t.options),
      closeAllDropdowns: M
    }), (y, S) => {
      const T = ee("svg-icon"), $e = ee("dk-dropdown", !0);
      return n(), o("div", {
        ref_key: "dropdownRef",
        ref: v,
        class: "dk-dropdown",
        onMouseenter: r,
        onMouseleave: u,
        onClick: S[1] || (S[1] = (U) => b(U, e.options)),
        onMousedown: S[2] || (S[2] = ce(() => {
        }, ["stop"]))
      }, [
        J(y.$slots, "default"),
        Ve(h("div", Jn, [
          h("div", {
            class: $([
              "dk-dropdown-popup__content",
              e.popupRight ? "dk-popup-right" : ""
            ]),
            style: Z({
              left: e.popupRight ? c.value + "px" : "",
              top: e.popupRight ? m.value - 6 + "px" : "",
              minWidth: e.popupMinWidth
            }),
            ref_key: "oppupRef",
            ref: d
          }, [
            (n(!0), o(Q, null, re(e.options, (U, xe) => (n(), o(Q, {
              key: U.value
            }, [
              U.children ? x("", !0) : (n(), o("div", {
                key: 0,
                class: $([
                  "dk-dropdown__item",
                  U.disabled ? "dk-dropdown__item--disabled" : "",
                  U.theme ? `dk-dropdown-item_type--${U.theme}` : "dk-dropdown-item_type--default"
                ]),
                onClick: ce((_e) => _(U, xe), ["stop"])
              }, [
                U.prefixIcon ? (n(), o("div", Qn, [
                  R(T, {
                    name: U.prefixIcon
                  }, null, 8, ["name"])
                ])) : x("", !0),
                h("div", Zn, A(U.content), 1),
                U.suffixIcon ? (n(), o("div", es, [
                  R(T, {
                    name: U.suffixIcon
                  }, null, 8, ["name"])
                ])) : x("", !0)
              ], 10, Xn)),
              Ve(h("div", {
                class: $(["dk-dropdown-child__item"]),
                onClick: ce((_e) => _(U, xe), ["stop"]),
                onMouseenter: ce(w, ["stop"]),
                onMouseleave: I,
                onMousedown: S[0] || (S[0] = ce(() => {
                }, ["stop"]))
              }, [
                R($e, {
                  ref_for: !0,
                  ref_key: "chidlDropdownRef",
                  ref: k,
                  onClick: z,
                  onCloseParentDropdown: f,
                  options: U.children,
                  popupRight: !0,
                  trigger: e.trigger
                }, {
                  default: we(() => [
                    h("div", {
                      class: $([
                        "dropdown-inner__item",
                        C.value && H.value === U.value ? "iterm-light" : "",
                        U.theme ? `dk-dropdown-item_type--${U.theme}` : "dk-dropdown-item_type--default"
                      ]),
                      onMouseenter: ce((_e) => L(_e, U), ["stop"])
                    }, [
                      U.prefixIcon ? (n(), o("div", as, [
                        R(T, {
                          name: U.prefixIcon
                        }, null, 8, ["name"])
                      ])) : x("", !0),
                      h("div", ns, A(U.content), 1),
                      h("div", ss, [
                        R(T, { name: "icon-arrow-right" })
                      ])
                    ], 42, ts)
                  ]),
                  _: 2
                }, 1032, ["options", "trigger"])
              ], 40, ls), [
                [Te, U.children && U.children.length > 0]
              ]),
              U.divider ? (n(), o("div", os)) : x("", !0)
            ], 64))), 128))
          ], 6)
        ], 512), [
          [Te, a.value]
        ])
      ], 544);
    };
  }
}), us = [
  { zhLabel: "一", enLabel: "Mo", value: 1 },
  { zhLabel: "二", enLabel: "Tu", value: 2 },
  { zhLabel: "三", enLabel: "We", value: 3 },
  { zhLabel: "四", enLabel: "Th", value: 4 },
  { zhLabel: "五", enLabel: "Fr", value: 5 },
  { zhLabel: "六", enLabel: "Sa", value: 6 },
  { zhLabel: "日", enLabel: "Su", value: 7 }
], vl = [
  { zhLabel: "一月", enLabel: "Jan", value: 1 },
  { zhLabel: "二月", enLabel: "Feb", value: 2 },
  { zhLabel: "三月", enLabel: "Mar", value: 3 },
  { zhLabel: "四月", enLabel: "Apr", value: 4 },
  { zhLabel: "五月", enLabel: "May", value: 5 },
  { zhLabel: "六月", enLabel: "Jun", value: 6 },
  { zhLabel: "七月", enLabel: "Jul", value: 7 },
  { zhLabel: "八月", enLabel: "Aug", value: 8 },
  { zhLabel: "九月", enLabel: "Sep", value: 9 },
  { zhLabel: "十月", enLabel: "Oct", value: 10 },
  { zhLabel: "十一月", enLabel: "Nov", value: 11 },
  { zhLabel: "十二月", enLabel: "Dec", value: 12 }
], ds = (e) => {
  e = e.replace(/\D/g, "");
  const s = e.padEnd(14, "0");
  return [`${s.slice(0, 4)}`, `${s.slice(4, 6)}`, `${s.slice(6, 8)}`, `${s.slice(8, 10)}`, `${s.slice(10, 12)}`, `${s.slice(12, 14)}`];
}, fl = (e, s, l) => {
  const t = e.getFullYear(), a = e.getMonth() + 1, v = e.getDate(), c = e.getHours(), m = e.getMinutes(), d = e.getSeconds();
  let r = "";
  return l ? r = s.replace("yyyy", t).replace("MM", a.toString().padStart(2, "0")).replace("dd", v.toString().padStart(2, "0")).replace("HH", c.toString().padStart(2, "0")).replace("mm", m.toString().padStart(2, "0")).replace("ss", d.toString().padStart(2, "0")) : r = s.replace("yyyy", t).replace("MM", a.toString().padStart(2, "0")).replace("dd", v.toString().padStart(2, "0")), r;
}, hl = (e, s, l, t) => {
  const a = e.getFullYear(), v = e.getMonth() + 1, c = e.getDate();
  return `${String(a)}-${String(v).padStart(2, "0")}-${String(c).padStart(2, "0")} ${s}:${l}:${t}`;
}, cs = { class: "input-box" }, rs = ["value"], vs = ["readonly", "placeholder"], fs = { class: "picker-wrapper" }, hs = { class: "date-picker" }, ps = { class: "year-month-wrapper" }, ms = { class: "month-wrapper" }, gs = { class: "year-wrapper" }, ks = { class: "dk-pagination-mini" }, ys = ["onClick", "onMouseenter", "onMouseleave"], bs = { class: "date-text" }, _s = {
  key: 0,
  class: "time-warpper"
}, xs = {
  key: 0,
  class: "time-show"
}, ws = {
  key: 1,
  class: "time-show"
}, $s = { class: "picker-content" }, Cs = { class: "active-mask" }, Ss = /* @__PURE__ */ h("div", null, null, -1), Vs = /* @__PURE__ */ h("div", null, null, -1), zs = { key: 0 }, Ms = { class: "time-picker" }, Ds = ["onClick"], Bs = ["onClick"], Ls = ["onClick"], Is = {
  key: 0,
  class: "picker-footer"
}, Ns = /* @__PURE__ */ h("div", { class: "footer-left" }, null, -1), Ts = { class: "footer-right" }, Rs = /* @__PURE__ */ Object.assign({
  name: "DkDatePicker"
}, {
  __name: "dk-date-picker",
  props: {
    modelValue: {
      type: String,
      default: ""
    },
    language: {
      type: String,
      default: "en"
      // zh en
    },
    size: {
      type: String,
      default: "small"
      // small medium large
    },
    placeholder: {
      type: String,
      default: "请选择日期"
    },
    enableTimePicker: {
      type: Boolean,
      default: !1
    },
    format: {
      type: String,
      default: "yyyy-MM-dd"
    },
    disabled: {
      type: Boolean,
      default: !1
    },
    clearable: {
      type: Boolean,
      default: !1
    },
    allowInput: {
      type: Boolean,
      default: !1
    },
    disabledDate: {
      type: Object,
      default: {
        before: () => !1,
        after: () => !1
      }
    }
  },
  emits: ["update:modelValue", "change"],
  setup(e, { emit: s }) {
    const l = e, t = X(() => l.format.includes("ss")), a = s, v = fe("formItemEvent"), c = i(!1), m = () => {
      if (c.value = !c.value, d.value = d.value.splice(0, d.value.length), c.value) {
        b.value = vl.find((p) => p.value === H.value).value, N.value = new Date(w.value).getFullYear();
        const B = Array.from({ length: 74 }, (p, W) => ({
          value: W + I.value - 37
        }));
        if (d.value = [...B], l.enableTimePicker && T.value) {
          const p = new Date(T.value);
          le("hour", String(p.getHours()).padStart(2, "0")), le("minute", String(p.getMinutes()).padStart(2, "0")), le("second", String(p.getSeconds()).padStart(2, "0"));
        }
        oe(() => {
          Ae();
        });
      }
    }, d = i([]), r = (B) => {
      const p = B.target.scrollHeight, W = B.target.clientHeight, E = B.target.scrollTop;
      if (p - W === E) {
        let Ce = Array.from({ length: 37 }, (Pe, q) => ({
          value: q + d.value[d.value.length - 1].value + 1
        }));
        d.value.push(...Ce);
      }
    }, u = () => {
      let B = JSON.parse(JSON.stringify(d.value[0].value)), p = Array.from({ length: 37 }, (W, E) => ({
        value: E + B - 37
      }));
      d.value = [...p, ...d.value];
    }, b = i(""), k = () => {
      new Date(w.value).getMonth() === 0 && (N.value = new Date(w.value).getFullYear() - 1);
      const B = new Date(w.value);
      B.setMonth(B.getMonth() - 1), w.value = B, b.value = B.getMonth() + 1;
    }, g = () => {
      const B = /* @__PURE__ */ new Date();
      N.value = B.getFullYear(), B.setMonth(B.getMonth()), b.value = B.getMonth() + 1;
    }, _ = () => {
      new Date(w.value).getMonth() + 1 === 12 && (N.value = new Date(w.value).getFullYear() + 1);
      const B = new Date(w.value);
      B.setMonth(B.getMonth() + 1), w.value = B, b.value = w.value.getMonth() + 1;
    }, C = (B) => {
      const p = new Date(w.value);
      p.setMonth(B.value - 1), w.value = p, b.value = B.value;
    }, w = i(/* @__PURE__ */ new Date()), I = X(() => w.value.getFullYear()), H = X(() => w.value.getMonth() + 1), L = X(() => {
      const B = [], p = new Date(I.value, H.value - 1, 1), W = p.getDay() - 1;
      p.setDate(p.getDate() - W);
      const E = new Date(I.value, H.value - 2, 1);
      for (E.setDate(E.getDate() + (42 - W)); p.getMonth() !== H.value - 1; ) {
        const Ce = p.getMonth() === H.value - 1;
        B.push({
          date: new Date(p),
          day: p.getDate(),
          disabled: !Ce,
          prevMonth: !Ce
        }), p.setDate(p.getDate() + 1);
      }
      for (; p.getMonth() === H.value - 1; ) {
        const Ce = p.getMonth() === H.value - 1;
        B.push({
          date: new Date(p),
          day: p.getDate(),
          disabled: !Ce,
          currentMonth: Ce,
          currentDay: p.getDate() === (/* @__PURE__ */ new Date()).getDate() && p.getMonth() === (/* @__PURE__ */ new Date()).getMonth() && p.getFullYear() === (/* @__PURE__ */ new Date()).getFullYear()
        }), p.setDate(p.getDate() + 1);
      }
      for (new Date(I.value, H.value, 1); B.length < 42; ) {
        const Ce = p.getMonth() === H.value - 1;
        B.push({
          date: new Date(p),
          day: p.getDate(),
          disabled: !Ce,
          nextMonth: !Ce
        }), p.setDate(p.getDate() + 1);
      }
      return B;
    }), N = i(null), V = (B) => {
      const p = new Date(w.value);
      p.setFullYear(B.value), w.value = p, N.value = B.value;
    }, f = i(null), M = (B) => {
      B.target.innerText !== "..." && f.value.scrollPosition();
    }, z = (B, p) => B.getFullYear() === p.getFullYear() && B.getMonth() === p.getMonth() && B.getDate() === p.getDate(), D = i("00"), y = i("00"), S = i("00"), T = i(""), $e = (B, p) => {
      if (B)
        return;
      let W = I.value, E = H.value, Ce = p.day;
      p.prevMonth ? E = H.value - 1 : p.nextMonth && (E = H.value + 1), b.value = E, l.enableTimePicker ? (T.value = `${String(W)}-${String(E).padStart(2, "0")}-${String(Ce).padStart(2, "0")} ${D.value}:${y.value}:${S.value}`, Y.value = "") : (T.value = `${String(W)}-${String(E).padStart(2, "0")}-${String(Ce).padStart(2, "0")}`, a("change", me(T.value)), c.value = !1);
    }, U = X(() => Array.from({ length: 24 }, (B, p) => String(p).padStart(2, "0"))), xe = X(() => Array.from({ length: 60 }, (B, p) => String(p).padStart(2, "0"))), _e = X(() => Array.from({ length: 60 }, (B, p) => String(p).padStart(2, "0"))), le = (B, p) => {
      B === "hour" ? D.value = p : B === "minute" ? y.value = p : B === "second" && (S.value = p);
      const W = T.value ? new Date(T.value) : /* @__PURE__ */ new Date();
      T.value = hl(W, D.value, y.value, S.value), oe(() => {
        B === "hour" ? O.value.scrollTop = O.value.querySelector(".current-hour").offsetTop - O.value.offsetHeight / 2 + 14 : B === "minute" ? te.value.scrollTop = te.value.querySelector(".current-minute").offsetTop - te.value.offsetHeight / 2 + 14 : B === "second" && t.value && (ue.value.scrollTop = ue.value.querySelector(".current-second").offsetTop - ue.value.offsetHeight / 2 + 14);
      });
    }, Re = i(0.04), Me = i(0), O = i(null), te = i(null), ue = i(null), ae = (B, p) => {
      Me.value += B.deltaY * Math.min(Re.value);
      const W = Math.round(Me.value);
      p === "hour" ? ne("hour", parseInt(D.value) + W) : p === "minute" ? ne("minute", parseInt(y.value) + W) : p === "second" && ne("second", parseInt(S.value) + W), Me.value -= W, oe(() => {
        const E = T.value ? new Date(T.value) : /* @__PURE__ */ new Date();
        T.value = hl(E, D.value, y.value, S.value), setTimeout(() => {
          p === "hour" ? O.value.scrollTop = O.value.querySelector(".current-hour").offsetTop - O.value.offsetHeight / 2 + 14 : p === "minute" ? te.value.scrollTop = te.value.querySelector(".current-minute").offsetTop - te.value.offsetHeight / 2 + 14 : p === "second" && (ue.value.scrollTop = ue.value.querySelector(".current-second").offsetTop - ue.value.offsetHeight / 2 + 14);
        }, 100);
      });
    };
    function ne(B, p) {
      let W = Number(p);
      isNaN(W) ? (B === "hour" || B === "minute" || B === "second") && (W = 0) : B === "hour" ? W = Math.max(0, Math.min(23, W)) : (B === "minute" || B === "second") && (W = Math.max(0, Math.min(59, W))), B === "hour" ? D.value = W.toString().padStart(2, "0") : B === "minute" ? y.value = W.toString().padStart(2, "0") : B === "second" && (S.value = W.toString().padStart(2, "0"));
    }
    const j = X(() => {
      if (l.size === "small")
        return "14px";
      if (l.size === "medium")
        return "16px";
      if (l.size === "large")
        return "18px";
    }), K = i(""), me = (B) => {
      if (!B)
        return "";
      let p = new Date(B);
      return fl(p, l.format, l.enableTimePicker);
    };
    Je(() => {
      K.value = me(T.value), l.enableTimePicker || (a("update:modelValue", K.value), v == null || v.eventType("change", K.value));
    }), se(
      () => l.modelValue,
      (B) => {
        if (B) {
          const p = new Date(B);
          w.value = p, T.value = p, b.value = p.getMonth() + 1, N.value = p.getFullYear(), l.enableTimePicker && (le("hour", String(p.getHours()).padStart(2, "0")), le("minute", String(p.getMinutes()).padStart(2, "0")), le("second", String(p.getSeconds()).padStart(2, "0")));
        }
        (B === "" || B === null || B === void 0) && (l.enableTimePicker && (le("hour", "00"), le("minute", "00"), le("second", "00")), T.value = "", a("update:modelValue", ""), v == null || v.eventType("change", K.value));
      }
    );
    const Be = i(null);
    se(
      () => c.value,
      (B) => {
        if (B && l.modelValue) {
          const p = new Date(l.modelValue);
          w.value = p, T.value = p, b.value = p.getMonth() + 1, N.value = p.getFullYear();
        }
        String(B) === "true" && (l.modelValue === "" || l.modelValue === null || l.modelValue === void 0) && oe(() => {
          l.enableTimePicker && (le("hour", "00"), le("minute", "00"), le("second", "00"), T.value = ""), g();
        }), B && oe(() => {
          window.innerWidth - ge.value.getBoundingClientRect().right < ge.value.offsetWidth ? ge.value.style.right = "0px" : ge.value.style.right = "unset";
        });
      }
    );
    const Le = i(null), pe = i(!1);
    De(() => {
      window.addEventListener("scroll", Ae, !0), document.addEventListener("mousedown", P), Ae();
    }), je(() => {
      window.removeEventListener("scroll", Ae), document.removeEventListener("mousedown", P);
    });
    const ge = i(null), Ae = () => {
      if (ge.value) {
        const B = Le.value.getBoundingClientRect().bottom + ge.value.offsetHeight, p = window.innerHeight;
        pe.value = B > p, pe.value ? (ge.value.style.bottom = `${Le.value.offsetHeight + 9}px`, ge.value.style.top = "unset") : (ge.value.style.bottom = "unset", ge.value.style.top = `${Le.value.offsetHeight + 9}px`);
      }
    }, P = (B) => {
      Le.value.contains(B.target) || (l.enableTimePicker ? l.modelValue ? (T.value = l.modelValue, c.value = !1) : ye() : c.value = !1);
    }, de = i("icon-date"), ke = () => {
      K.value && l.clearable && (de.value = "icon-clear");
    }, ze = () => {
      K.value && l.clearable && (de.value = "icon-date");
    }, Ne = () => {
      K.value && l.clearable && de.value === "icon-clear" && (de.value = "icon-date", l.enableTimePicker && (le("hour", "00"), le("minute", "00"), le("second", "00")), T.value = "", a("update:modelValue", ""), a("change", ""), v == null || v.eventType("change", ""));
    }, He = X(() => K.value && c.value && l.clearable && de.value === "icon-clear" ? "rgba(0, 0, 0, 0.4)" : "#1E75F"), F = (B) => {
      if (l.allowInput) {
        K.value = B.target.value;
        let p = ds(B.target.value);
        const W = new Date(...p);
        w.value = W, C({ value: Number(p[1]) }), I.value = Number(p[0]), H.value = Number(p[1]), N.value = Number(p[0]), b.value = Number(p[1]);
      }
    }, Y = i(""), ve = (B, p) => {
      if (B)
        return;
      p.date.setHours(D.value), p.date.setMinutes(y.value), p.date.setSeconds(S.value);
      const W = fl(p.date, l.format, l.enableTimePicker);
      Y.value = W;
    }, he = (B, p) => {
      Y.value = "";
    }, ye = () => {
      le("hour", "00"), le("minute", "00"), le("second", "00"), g(), oe(() => {
        T.value = "", a("update:modelValue", ""), v == null || v.eventType("change", ""), c.value = !1;
      });
    }, Ie = () => {
      K.value = me(T.value), a("update:modelValue", K.value), a("change", K.value), v == null || v.eventType("change", K.value), c.value = !1;
    };
    return (B, p) => {
      const W = ee("svg-icon"), E = ee("dk-option"), Ce = ee("dk-select"), Pe = ee("dk-button");
      return n(), o("div", {
        ref_key: "datePicker",
        ref: Le,
        class: $(["dk-datetime-picker", `datetime-picker--${e.size}`])
      }, [
        h("div", {
          class: $(["input-wrapper", {
            "input-active": c.value && !e.disabled,
            "input-disabled": e.disabled
          }]),
          onClick: m,
          onMouseenter: ke,
          onMouseleave: ze
        }, [
          h("div", cs, [
            Y.value ? (n(), o("input", {
              key: 0,
              type: "text",
              value: Y.value,
              class: "hover-value-like__placeholder"
            }, null, 8, rs)) : Ve((n(), o("input", {
              key: 1,
              onInput: F,
              type: "text",
              "onUpdate:modelValue": p[0] || (p[0] = (q) => K.value = q),
              readonly: !e.allowInput,
              placeholder: e.placeholder
            }, null, 40, vs)), [
              [Ye, K.value]
            ])
          ]),
          h("span", {
            class: "icon",
            onClick: ce(Ne, ["stop"])
          }, [
            R(W, {
              size: j.value,
              color: He.value,
              name: de.value
            }, null, 8, ["size", "color", "name"])
          ])
        ], 34),
        Ve(h("div", {
          ref_key: "datePickerWapper",
          ref: ge,
          class: $(["picker-popup", { "date-picker--above": pe.value }])
        }, [
          h("div", fs, [
            h("div", hs, [
              h("div", ps, [
                h("div", ms, [
                  R(Ce, {
                    modelValue: b.value,
                    "onUpdate:modelValue": p[1] || (p[1] = (q) => b.value = q),
                    onChange: C,
                    size: "medium"
                  }, {
                    default: we(() => [
                      (n(!0), o(Q, null, re(G(vl), (q) => (n(), ie(E, {
                        value: q.value,
                        label: q[`${e.language}Label`]
                      }, null, 8, ["value", "label"]))), 256))
                    ]),
                    _: 1
                  }, 8, ["modelValue"])
                ]),
                h("div", gs, [
                  R(Ce, {
                    ref_key: "yearSelectRef",
                    ref: f,
                    modelValue: N.value,
                    "onUpdate:modelValue": p[2] || (p[2] = (q) => N.value = q),
                    onChange: V,
                    onClick: ce(M, ["stop"]),
                    onScroll: r,
                    size: "medium"
                  }, {
                    slotOption: we(() => [
                      h("div", {
                        class: "dk-select-option-more",
                        onClick: u
                      }, "...")
                    ]),
                    default: we(() => [
                      (n(!0), o(Q, null, re(d.value, (q) => (n(), ie(E, {
                        value: q.value,
                        label: q.value
                      }, null, 8, ["value", "label"]))), 256))
                    ]),
                    _: 1
                  }, 8, ["modelValue"])
                ]),
                h("div", ks, [
                  h("div", {
                    class: "prev-btn",
                    onClick: k
                  }, [
                    R(W, { name: "icon-arrow-left" })
                  ]),
                  h("div", {
                    class: "cur-btn",
                    onClick: g
                  }, [
                    R(W, { name: "icon-round" })
                  ]),
                  h("div", {
                    class: "next-btn",
                    onClick: _
                  }, [
                    R(W, { name: "icon-arrow-right" })
                  ])
                ])
              ]),
              h("div", {
                class: "day-wrapper",
                ref_key: "dayWrapperRef",
                ref: Be
              }, [
                (n(!0), o(Q, null, re(G(us), (q) => (n(), o("div", {
                  class: "day-name",
                  key: q.value
                }, A(q[`${e.language}Label`]), 1))), 128)),
                (n(!0), o(Q, null, re(L.value, (q) => (n(), o("div", {
                  class: $(["day", {
                    "dk-date-picker__cell--disabled": e.disabledDate.before(q.date) || e.disabledDate.after(q.date),
                    "prev-month": q.prevMonth,
                    "current-month": q.currentMonth,
                    "next-month": q.nextMonth
                  }]),
                  key: q.date,
                  onClick: (Fe) => $e(e.disabledDate.before(q.date) || e.disabledDate.after(q.date), q),
                  onMouseenter: (Fe) => ve(e.disabledDate.before(q.date) || e.disabledDate.after(q.date), q),
                  onMouseleave: (Fe) => he()
                }, [
                  h("span", {
                    class: $(["day-date", {
                      active: z(q.date, new Date(T.value)),
                      "current-day": q.currentDay
                    }])
                  }, [
                    h("span", bs, A(q.day), 1)
                  ], 2)
                ], 42, ys))), 128))
              ], 512)
            ]),
            e.enableTimePicker ? (n(), o("div", _s, [
              t.value ? (n(), o("div", xs, A(D.value) + " : " + A(y.value) + " : " + A(S.value), 1)) : x("", !0),
              t.value ? x("", !0) : (n(), o("div", ws, A(D.value) + " : " + A(y.value), 1)),
              h("div", $s, [
                h("div", Cs, [
                  Ss,
                  Vs,
                  t.value ? (n(), o("div", zs)) : x("", !0)
                ]),
                h("div", Ms, [
                  h("ul", {
                    class: "picker-column",
                    ref_key: "hourColumn",
                    ref: O,
                    onWheel: p[3] || (p[3] = (q) => ae(q, "hour"))
                  }, [
                    (n(!0), o(Q, null, re(U.value, (q) => (n(), o("li", {
                      class: $(["picker-item", { "current-hour": D.value === q }]),
                      key: q,
                      onClick: (Fe) => le("hour", q)
                    }, [
                      h("span", {
                        class: $({ active: D.value === q })
                      }, A(q), 3)
                    ], 10, Ds))), 128))
                  ], 544),
                  h("ul", {
                    class: "picker-column",
                    ref_key: "minuteColumn",
                    ref: te,
                    onWheel: p[4] || (p[4] = (q) => ae(q, "minute"))
                  }, [
                    (n(!0), o(Q, null, re(xe.value, (q) => (n(), o("li", {
                      class: $(["picker-item", { "current-minute": y.value === q }]),
                      key: q,
                      onClick: (Fe) => le("minute", q)
                    }, [
                      h("span", {
                        class: $({ active: y.value === q })
                      }, A(q), 3)
                    ], 10, Bs))), 128))
                  ], 544),
                  t.value ? (n(), o("ul", {
                    key: 0,
                    class: "picker-column",
                    ref_key: "secondColumn",
                    ref: ue,
                    onWheel: p[5] || (p[5] = (q) => ae(q, "second"))
                  }, [
                    (n(!0), o(Q, null, re(_e.value, (q) => (n(), o("li", {
                      class: $(["picker-item", { "current-second": S.value === q }]),
                      key: q,
                      onClick: (Fe) => le("second", q)
                    }, [
                      h("span", {
                        class: $({ active: S.value === q })
                      }, A(q), 3)
                    ], 10, Ls))), 128))
                  ], 544)) : x("", !0)
                ])
              ])
            ])) : x("", !0)
          ]),
          e.enableTimePicker ? (n(), o("div", Is, [
            Ns,
            h("div", Ts, [
              R(Pe, {
                onClick: ye,
                type: "textPrimary",
                size: "small"
              }, {
                default: we(() => [
                  be(A(e.language === "en" ? "Cancel" : "取消"), 1)
                ]),
                _: 1
              }),
              R(Pe, {
                onClick: Ie,
                size: "small"
              }, {
                default: we(() => [
                  be(A(e.language === "en" ? "Ok" : "确定"), 1)
                ]),
                _: 1
              })
            ])
          ])) : x("", !0)
        ], 2), [
          [Te, c.value && !e.disabled]
        ])
      ], 2);
    };
  }
}), As = { class: "dk-tree" }, Os = {
  key: 0,
  class: "dk-tree__list"
}, Ps = {
  key: 1,
  class: "dk-tree__empty"
}, Hs = /* @__PURE__ */ Object.assign({
  name: "DkTree"
}, {
  __name: "dk-tree",
  props: {
    data: {
      type: Array,
      default: []
    },
    nodeKey: {
      type: String,
      default: ""
    },
    expandAll: {
      type: Boolean,
      default: !1
    },
    activable: {
      type: Boolean,
      default: !1
    },
    searchText: {
      type: String,
      default: ""
    },
    defaultExpandedKeys: {
      type: Array,
      default: () => []
    },
    checkable: {
      type: Boolean,
      default: !1
    },
    defaultCheckedKeys: {
      type: Array,
      default: () => []
    },
    modelValue: {
      // 绑定值多选情况下生效
      type: Array,
      default: () => []
    },
    keys: {
      type: Object,
      default: () => ({
        value: "value",
        label: "label",
        children: "children"
      })
    },
    valueMode: {
      // onlyLeaf:仅呈现叶子节点 | all: 呈现所有节点
      type: String,
      default: "all"
    }
  },
  emits: ["update:modelValue", "click", "change"],
  setup(e, { expose: s, emit: l }) {
    const t = l, a = e, v = X(() => c(a.data, a.searchText));
    function c(f, M) {
      if (!M)
        return f;
      const z = [];
      for (const D of f)
        D[a.keys.label].toLowerCase().includes(M.toLowerCase()) && z.push({
          ...D,
          [a.keys.children]: D[a.keys.children] ? c(D[a.keys.children], M) : []
        });
      return z;
    }
    Oe("nodeKey", a.nodeKey);
    const m = i({}), d = (f) => {
      m.value = f, t("click", f);
    }, r = (f, M) => {
      M ? w.value.indexOf(f[a.nodeKey]) === -1 && (w.value.push(f[a.nodeKey]), a.valueMode === "all" ? a.modelValue.includes(f[a.keys.value]) || (a.modelValue.push(f[a.keys.value]), t("change", f, M)) : a.valueMode === "onlyLeaf" && (f[a.keys.children] && f[a.keys.children].length > 0 || f.hasChild && f.hasChild === "yes" || a.modelValue.includes(f[a.keys.value]) || (a.modelValue.push(f[a.keys.value]), t("change", f, M))), t("update:modelValue", a.modelValue), f[a.keys.children] && f[a.keys.children].length > 0 && f[a.keys.children].forEach((z) => {
        r(z, M);
      })) : (w.value.splice(w.value.indexOf(f[a.nodeKey]), 1), a.modelValue.splice(a.modelValue.indexOf(f[a.keys.value]), 1), t("update:modelValue", a.modelValue), t("change", f, M), f[a.keys.children] && f[a.keys.children].length > 0 && f[a.keys.children].forEach((z) => {
        r(z, M);
      }));
    }, u = (f, M) => {
      a.checkable && r(f, M);
    }, b = i(a.expandAll), k = i(a.activable), g = i(a.defaultExpandedKeys), _ = i(a.checkable), C = i(a.modelValue), w = i([]), I = i(a.defaultCheckedKeys), H = i(a.keys);
    Oe("treeState", {
      checkedNode: m,
      nodeClick: d,
      expandAll: b,
      activable: k,
      defaultExpandedKeys: g,
      defaultCheckedKeys: I,
      checkable: _,
      modelValue: C,
      modelValueKeys: w,
      handleModelValue: u,
      keys: H
    }), se(
      () => a.modelValue,
      (f, M) => {
        C.value = f;
      }
    );
    const L = (f, M, z = []) => ((M && M.length > 0 ? M : a.data).forEach((y) => {
      if (y[a.nodeKey] === f) {
        z.push({ ...y });
        return;
      } else
        y[a.keys.children] && y[a.keys.children].length && L(f, y[a.keys.children], z);
    }), z), N = (f, M, z = []) => {
      for (let D of f) {
        if (D[a.nodeKey] === M)
          return z;
        if (D[a.keys.children] && D[a.keys.children].length > 0) {
          const y = { ...D };
          delete y[a.keys.children];
          const S = N(D[a.keys.children], M, [...z, y]);
          if (S)
            return S;
        }
      }
      return null;
    };
    return s({
      getChildNodes: L,
      getParentNodes: (f) => N(a.data, f)
    }), (f, M) => {
      const z = ee("dk-tree-node");
      return n(), o("div", As, [
        v.value.length > 0 ? (n(), o("div", Os, [
          (n(!0), o(Q, null, re(v.value, (D) => (n(), ie(z, { data: D }, gl({ _: 2 }, [
            Se().default ? {
              name: "default",
              fn: we((y) => [
                J(f.$slots, "default", {
                  node: y.node
                })
              ]),
              key: "0"
            } : void 0
          ]), 1032, ["data"]))), 256))
        ])) : (n(), o("div", Ps, "暂无数据"))
      ]);
    };
  }
}), Fs = { class: "dk-tree-node__content" }, Es = { class: "dk-tree__icon--content" }, Ws = {
  key: 2,
  class: "dk-tree__label-text"
}, js = { class: "dk-tree-node-content" }, Ks = /* @__PURE__ */ Object.assign({
  name: "DkTreeNode"
}, {
  __name: "dk-tree-node",
  props: {
    data: {
      type: Object,
      default: {}
    },
    depth: {
      type: Number,
      default: 0
    }
  },
  setup(e) {
    const s = e, l = fe("treeState");
    let t = fe("nodeKey");
    const a = (V) => {
      l.nodeClick(V);
    }, v = i(!1), c = (V, f) => {
      v.value = !v.value;
    }, m = i(null);
    se(() => l.checkedNode.value, (V) => {
      m.value = V;
    }, { deep: !0 }), l.expandAll.value && (v.value = !0), l.defaultExpandedKeys.value.includes(s.data[t]) && (v.value = !0);
    const d = (V) => {
      l.handleModelValue(V, !0), V[l.keys.value.children] && V[l.keys.value.children].length && V[l.keys.value.children].forEach((f) => {
        l.defaultCheckedKeys.value.includes(s.data[t]) && d(f);
      });
    };
    l.defaultCheckedKeys.value.includes(s.data[t]) && d(s.data);
    const r = i([]), u = We({ list: [] });
    se(() => l.modelValueKeys.value, (V, f) => {
      var z;
      r.value = V, u.list = V;
      let M = g(s.data).filter((D) => D !== s.data[t]);
      _(r.value, g(s.data)).length > 0 && _(r.value, M).length === 0 && r.value.length > 0 && M.length > 0 && l.handleModelValue({
        [t]: s.data[t],
        [l.keys.value.value]: s.data[l.keys.value.value],
        hasChild: ((z = s.data[l.keys.value.children]) == null ? void 0 : z.length) > 0 ? "yes" : "no"
      }, !1);
    }, { deep: !0 }), se(() => l.modelValue.value, (V) => {
      V && V.length > 0 && V.forEach((f) => {
        f === s.data[l.keys.value.value] && d(s.data);
      });
    }, { deep: !0 });
    const b = X(() => {
      var M, z, D;
      let V = !1, f = s.data[l.keys.value.children] ? C(s.data[l.keys.value.children]) : [];
      return _(r.value, g(s.data)).length > 0 && g(s.data).length > ((M = s.data[l.keys.value.children]) == null ? void 0 : M.length) - 1 && ((z = s.data[l.keys.value.children]) == null ? void 0 : z.length) > 0 && r.value.length > 0 && _(r.value, f).length > 0 && f.length > 0 ? (V = !0, l.handleModelValue({
        [t]: s.data[t],
        [l.keys.value.value]: s.data[l.keys.value.value],
        hasChild: ((D = s.data[l.keys.value.children]) == null ? void 0 : D.length) > 0 ? "yes" : "no"
      }, !0)) : V = !1, V;
    }), k = X(() => {
      var M;
      let V = !1, f = s.data[l.keys.value.children] ? C(s.data[l.keys.value.children]) : [];
      return _(r.value, f).length > 0 && _(r.value, g(s.data)).length !== g(s.data).length && ((M = s.data[l.keys.value.children]) == null ? void 0 : M.length) > 0 && r.value.length > 0 && f.length > 0 ? V = !0 : V = !1, V;
    }), g = (V, f = []) => {
      if (f.push(V[t]), V[l.keys.value.children])
        for (const M of V[l.keys.value.children])
          g(M, f);
      return f;
    }, _ = (V = [], f = []) => V.filter((M) => f.includes(M)), C = (V = []) => {
      let f = [];
      return V.forEach((M) => {
        f.push(M[t]);
      }), f;
    }, w = i(null), I = (V, f) => {
      w.value = f;
    }, H = (V) => {
      l.handleModelValue(w.value, V);
    }, L = (V) => {
      var f;
      V && k.value && l.handleModelValue({
        [t]: s.data[t],
        [l.keys.value.value]: s.data[l.keys.value.value],
        hasChild: ((f = s.data[l.keys.value.children]) == null ? void 0 : f.length) > 0 ? "yes" : "no"
      }, !1), l.handleModelValue(w.value, V);
    }, N = (V) => {
      if (V[l.keys.value.children] && V[l.keys.value.children].length > 0) {
        let f = C(V[l.keys.value.children]);
        return _(r.value, f).length === f.length;
      } else
        return r.value.includes(V[t]);
    };
    return (V, f) => {
      const M = ee("svg-icon"), z = ee("dk-checkbox"), D = ee("dk-tree-node", !0);
      return n(), o("div", {
        class: $(["dk-tree-item", ["level-" + e.depth]])
      }, [
        h("div", Fs, [
          e.data[G(l).keys.value.children] && e.data[G(l).keys.value.children].length > 0 ? (n(), o("div", {
            key: 0,
            class: $([
              "dk-tree__icon",
              v.value ? "dk-tree__icon-down" : "dk-tree__icon-right"
            ]),
            onClick: f[0] || (f[0] = (y) => c(y, e.data))
          }, [
            h("span", Es, [
              R(M, {
                color: "black",
                name: "icon-caret-right"
              })
            ])
          ], 2)) : x("", !0),
          h("div", {
            class: $([
              "dk-tree__label",
              // 单个节点选中样式
              m.value && m.value[G(t)] === e.data[G(t)] && G(l).activable.value && !G(l).checkable.value ? "dk-is-active" : "",
              G(l).checkable.value && N(e.data) ? "dk-is-checked" : ""
            ]),
            onClick: f[2] || (f[2] = (y) => a(e.data))
          }, [
            G(l).checkable.value ? (n(), o("span", {
              key: 0,
              onClick: f[1] || (f[1] = ce((y) => I(y, e.data), ["stop"])),
              class: "dk-tree__label-checkbox"
            }, [
              e.data[G(l).keys.value.children] && e.data[G(l).keys.value.children].length ? (n(), ie(z, {
                key: 0,
                checked: b.value,
                indeterminate: k.value,
                "on-change": L
              }, null, 8, ["checked", "indeterminate"])) : (n(), ie(z, {
                key: 1,
                checked: G(l).modelValueKeys.value.includes(s.data[G(t)]),
                "on-change": H
              }, null, 8, ["checked"]))
            ])) : x("", !0),
            Se().default ? J(V.$slots, "default", {
              key: 1,
              node: e.data
            }) : (n(), o("span", Ws, A(e.data[G(l).keys.value.label]), 1))
          ], 2)
        ]),
        e.data[G(l).keys.value.children] && e.data[G(l).keys.value.children].length > 0 ? (n(), o("div", {
          key: 0,
          class: $(["dk-tree-node__children", { "dk-tree__item--open": v.value }])
        }, [
          (n(!0), o(Q, null, re(e.data[G(l).keys.value.children], (y, S) => (n(), ie(ml, { name: "tree-node-transition" }, {
            default: we(() => [
              Ve(h("div", js, [
                R(D, {
                  data: y,
                  depth: e.depth + 1
                }, gl({ _: 2 }, [
                  Se().default ? {
                    name: "default",
                    fn: we((T) => [
                      J(V.$slots, "default", {
                        node: T.node
                      })
                    ]),
                    key: "0"
                  } : void 0
                ]), 1032, ["data", "depth"])
              ], 512), [
                [Te, v.value]
              ])
            ]),
            _: 2
          }, 1024))), 256))
        ], 2)) : x("", !0)
      ], 2);
    };
  }
}), Ys = ["readonly", "placeholder"], qs = { class: "dk-year-picker-header" }, Us = { class: "dk-year-picker-header__left" }, Gs = { class: "dk-year-picker-header__right" }, Js = { class: "dk-year-picker-body" }, Xs = { class: "dk-year-picker-item disabled" }, Qs = ["onClick"], Zs = { class: "dk-year-picker-item disabled" }, eo = /* @__PURE__ */ Object.assign({
  name: "DkYearPicker"
}, {
  __name: "dk-year-picker",
  props: {
    modelValue: {
      type: String,
      default: ""
    },
    size: {
      type: String,
      default: "small"
      // small medium large
    },
    placeholder: {
      type: String,
      default: "请选择年份"
    },
    disabled: {
      type: Boolean,
      default: !1
    },
    clearable: {
      type: Boolean,
      default: !1
    },
    allowInput: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["update:modelValue", "change"],
  setup(e, { emit: s }) {
    const l = e, t = s, a = fe("formItemEvent"), v = (/* @__PURE__ */ new Date()).getFullYear(), c = i(v);
    let m = i(Math.floor(v / 10) * 10);
    const d = X(() => m.value + 9), r = i(`${m.value}-${m.value + 9}`), u = X(() => Array.from({ length: d.value - m.value + 1 }, (j, K) => m.value + K)), b = X(() => {
      const j = [];
      for (let K = 1900; K <= v; K += 10)
        j.push({ label: `${K}-${K + 9}`, value: `${K}-${K + 9}` });
      return j;
    }), k = (j) => {
      c.value = j, H.value = j, t("update:modelValue", j.toString()), t("change", j.toString()), L.value = !1, (j < m.value || j > d.value) && (m.value = Math.floor(j / 10) * 10);
    }, g = () => {
      m.value > 1900 && (m.value -= 10, I());
    }, _ = () => {
      m.value += 10, I();
    }, C = (j) => {
      m.value = parseInt(j.value.split("-")[0].trim()), I();
    }, w = (j) => {
      m.value = Math.floor((j || v) / 10) * 10, r.value = `${m.value}-${m.value + 9}`, u.value = Array.from({ length: 11 }, (K, me) => m.value + me);
    }, I = () => {
      r.value = `${m.value}-${m.value + 9}`;
    }, H = i(""), L = i(!1), N = i(null), V = i(null), f = i(null);
    let M = i(null);
    const z = i(), D = (j) => {
      j && (f.value = j);
    }, y = i(), S = () => {
      L.value = !L.value, L.value ? (y.value.focus(), M.value = setInterval(() => {
        var j;
        z.value = (j = V.value) == null ? void 0 : j.getBoundingClientRect().top;
      }, 40)) : clearInterval(M.value);
    };
    se(
      () => z.value,
      (j, K) => {
        L.value && te();
      }
    );
    const T = i("icon-date"), $e = () => {
      H.value && l.clearable && (T.value = "icon-clear");
    }, U = () => {
      H.value && l.clearable && (T.value = "icon-date");
    }, xe = (j) => {
      if (l.allowInput) {
        const K = j.target.value;
        _e(K) && (c.value = parseInt(K), H.value = K, t("update:modelValue", K), t("change", K));
      }
    };
    function _e(j) {
      const K = parseInt(j);
      return K >= 1900 && K <= (/* @__PURE__ */ new Date()).getFullYear();
    }
    const le = (j) => {
      setTimeout(() => {
        L.value = !1;
      }, 80);
    }, Re = fe("dialogBodyRef", null), Me = fe("dialogRef", null), O = fe("dkTable", null), te = () => {
      var Ae;
      const { top: j, width: K, bottom: me } = V.value.getBoundingClientRect(), Be = (Ae = f.value) == null ? void 0 : Ae.offsetHeight, Le = V.value.offsetHeight, pe = window.innerHeight - V.value.getBoundingClientRect().bottom;
      let ge = l.size === "small" ? 10 : l.size === "medium" ? 12 : 14;
      if (pe - 10 >= Be)
        Re || O ? f.value.style.top = `${j - Me.value.offsetTop + Le + ge}px` : f.value.style.top = `${j + Le + ge}px`, f.value.style.bottom = "unset";
      else if (f.value.style.top = "unset", Re || O) {
        let P = (window.innerHeight - Me.value.offsetHeight) / 2;
        f.value.style.bottom = `${window.innerHeight - me - P + Le + ge}px`;
      } else
        f.value.style.bottom = `${window.innerHeight - me + Le + ge}px`;
    };
    Je(() => {
      l.modelValue && a && a.eventType("change", l.modelValue);
    }), se(
      () => l.modelValue,
      (j) => {
        j && (k(j), w(j));
      }
    );
    const ue = () => {
      l.clearable && T.value === "icon-clear" && (T.value = "icon-date", c.value = null, H.value = null, t("update:modelValue", ""), t("change", ""), a == null || a.eventType("change", ""));
    }, ae = X(() => H.value && L.value && l.clearable && T.value === "icon-clear" ? "rgba(0, 0, 0, 0.4)" : "#1E75F"), ne = X(() => {
      if (l.size === "small")
        return "14px";
      if (l.size === "medium")
        return "16px";
      if (l.size === "large")
        return "18px";
    });
    return (j, K) => {
      const me = ee("svg-icon"), Be = ee("dk-option"), Le = ee("dk-select");
      return n(), o("div", {
        ref_key: "yearRef",
        ref: N,
        class: $(["dk-year-picker", ["dk-year-picker", `year-picker--${e.size}`]])
      }, [
        h("div", {
          class: $(["input-wrapper", {
            "input-active": L.value && !e.disabled,
            "input-disabled": e.disabled
          }]),
          ref_key: "inputRef",
          ref: y,
          onClick: S,
          onMouseenter: $e,
          onMouseleave: U
        }, [
          h("div", {
            class: "input-box",
            ref_key: "yearInputRef",
            ref: V
          }, [
            Ve(h("input", {
              onInput: xe,
              type: "text",
              "onUpdate:modelValue": K[0] || (K[0] = (pe) => H.value = pe),
              readonly: !e.allowInput,
              placeholder: e.placeholder,
              onBlur: le
            }, null, 40, Ys), [
              [Ye, H.value]
            ])
          ], 512),
          h("span", {
            class: "icon",
            onClick: ce(ue, ["stop"])
          }, [
            R(me, {
              size: ne.value,
              color: ae.value,
              name: T.value
            }, null, 8, ["size", "color", "name"])
          ])
        ], 34),
        Ve(h("div", {
          ref: L.value ? (pe) => D(pe) : "",
          class: "dk-year-picker-popup"
        }, [
          h("div", qs, [
            h("div", Us, [
              R(Le, {
                style: { width: "110px" },
                ref: "yearSelectRef",
                modelValue: r.value,
                "onUpdate:modelValue": K[1] || (K[1] = (pe) => r.value = pe),
                onChange: C,
                size: "medium"
              }, {
                default: we(() => [
                  (n(!0), o(Q, null, re(b.value, (pe) => (n(), ie(Be, {
                    key: pe.value,
                    value: pe.value,
                    label: pe.label
                  }, null, 8, ["value", "label"]))), 128))
                ]),
                _: 1
              }, 8, ["modelValue"])
            ]),
            h("div", Gs, [
              h("div", {
                class: "prev-btn",
                onClick: g
              }, [
                R(me, { name: "icon-arrow-left" })
              ]),
              h("div", {
                class: "cur-btn",
                onClick: w
              }, [
                R(me, { name: "icon-round" })
              ]),
              h("div", {
                class: "next-btn",
                onClick: _
              }, [
                R(me, { name: "icon-arrow-right" })
              ])
            ])
          ]),
          h("div", Js, [
            h("div", Xs, A(G(m) - 1), 1),
            (n(!0), o(Q, null, re(u.value, (pe) => (n(), o("div", {
              key: pe,
              class: $(["dk-year-picker-item", { selected: pe.toString() == c.value }]),
              onClick: (ge) => k(pe)
            }, A(pe), 11, Qs))), 128)),
            h("div", Zs, A(d.value + 1), 1)
          ])
        ], 512), [
          [Te, L.value && !e.disabled]
        ])
      ], 2);
    };
  }
}), lo = {
  key: 0,
  class: "checked-data"
}, to = {
  key: 1,
  class: "like-placeholder"
}, ao = { class: "dk-cascader_suffixIcon" }, no = ["onClick"], so = { class: "dk-cascader__item-text" }, oo = {
  key: 0,
  class: "dk-dropdown__suffix-icon"
}, io = ["onClick"], uo = /* @__PURE__ */ Object.assign({
  name: "DkCascader"
}, {
  __name: "dk-cascader",
  props: {
    modelValue: {
      type: [String, Number, Array],
      default: void 0
    },
    options: {
      type: Array,
      default: []
    },
    popupMinWidth: {
      type: String,
      default: "160px"
    },
    size: {
      type: String,
      default: "small"
      // small/medium/large
    },
    placeholder: {
      type: String,
      default: "请选择内容"
    },
    clearable: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["click", "update:modelValue"],
  setup(e, { expose: s, emit: l }) {
    const t = e, a = fe("formItemEvent");
    se(() => t.modelValue, (O) => {
      let te = { label: "topFirst", value: "topFirst", children: t.options };
      u.value = [], V.value = [];
      function ue(ae, ne) {
        M(ae, ne) && (V.value.push(ae.value), u.value.push(ae)), ae.children && ae.children.length && ae.children.forEach((K) => {
          if (K.children && K.children.length > 0)
            ue(K, ne);
          else if (K.value === ne) {
            u.value.push(K), V.value.push(K.value);
            let me = [];
            u.value.forEach((Be) => {
              Be.value !== "topFirst" && me.push(Be.label);
            }), C.value = me.join("/");
          }
        });
      }
      ue(te, O);
    });
    const v = i(!1), c = i(null), m = i(0), d = i(0), r = i(0), u = i([]), b = (O) => {
      m.value = O.target.offsetWidth + 6, d.value = -O.target.offsetHeight - 14;
    }, k = i(null), g = i(null), _ = (O) => {
      O && (g.value = O);
    }, C = i("");
    let w = i(null), I = i(null);
    const H = (O, te) => {
      console.log("isShowcascader.value", v.value), console.log("popupData.value", u.value), t.modelValue || (u.value = [], V.value = [], u.value.push({ label: "topFirst", value: "topFirst", children: t.options })), v.value ? v.value = !1 : v.value = !0, w.value = setInterval(() => {
        var ue;
        I.value = (ue = k.value) == null ? void 0 : ue.getBoundingClientRect().top;
      }, 40), oe(() => {
        Me();
      });
    }, L = i(null), N = l, V = i([]), f = (O, te) => {
      if (!O.disabled)
        if (O && O.children && O.children.length > 0) {
          if (u.value.some((ne) => ne.value === O.value))
            return;
          V.value = [], u.value.push(O);
          const ae = [];
          u.value.forEach((ne) => {
            ne.children && ne.children.length > 0 && M(ne, O.value) && (V.value.push(ne.value), ae.push(ne));
          }), u.value = ae;
        } else {
          if (V.value.some((ne) => ne === O.value)) {
            v.value = !1;
            return;
          }
          u.value.push(O), V.value.push(O.value), v.value = !1, clearInterval(w.value);
          let ae = [];
          u.value.forEach((ne) => {
            ne.value !== "topFirst" && ae.push(ne.label);
          }), C.value = ae.join("/"), N("update:modelValue", u.value[u.value.length - 1].value), a == null || a.eventType("change", u.value[u.value.length - 1].value);
        }
    }, M = (O, te) => {
      if (O.value === te)
        return !0;
      for (const ue of O.children)
        if (ue.value === te || ue.children && ue.children.length > 0 && M(ue, te))
          return !0;
      return !1;
    };
    se(
      () => I.value,
      (O, te) => {
        v.value && Me();
      }
    );
    const z = i(void 0), D = (O) => {
      c.value.contains(O.target) || (v.value = !1, z.value = void 0);
    };
    De(() => {
      document.addEventListener("mousedown", D);
    }), je(() => {
      document.removeEventListener("mousedown", D);
    });
    const y = () => {
      v.value = !1, z.value = void 0;
    }, S = () => {
      var O;
      v.value = !1, z.value = void 0, (O = L.value) == null || O.forEach((te) => {
        te.closecascader();
      });
    }, T = X(() => {
      if (t.size === "small")
        return "14px";
      if (t.size === "medium")
        return "16px";
      if (t.size === "large")
        return "18px";
    }), $e = i(!1), U = () => {
      t.clearable && C.value.length && ($e.value = !0);
    }, xe = () => {
      $e.value = !1;
    }, _e = () => {
      C.value = "", N("update:modelValue", ""), $e.value = !1;
    }, le = fe("dialogBodyRef", null), Re = fe("dialogRef", null), Me = () => {
      var K;
      const { top: O, width: te, bottom: ue } = k.value.getBoundingClientRect(), ae = (K = g.value) == null ? void 0 : K.offsetHeight, ne = k.value.offsetHeight;
      if (console.log("inputHeight", ne), window.innerHeight - k.value.getBoundingClientRect().bottom - 6 >= ae)
        le ? g.value.style.top = `${O - Re.value.offsetTop + ne}px` : g.value.style.top = `${O + ne}px`, g.value.style.bottom = "unset";
      else if (g.value.style.top = "unset", le) {
        let me = (window.innerHeight - Re.value.offsetHeight) / 2;
        g.value.style.bottom = `${window.innerHeight - ue - me + ne}px`;
      } else
        g.value.style.bottom = `${window.innerHeight - ue + ne / 2}px`;
    };
    return s({
      closecascader: y,
      closeAllcascaders: S
    }), (O, te) => {
      const ue = ee("svg-icon");
      return n(), o("div", {
        ref_key: "cascaderRef",
        ref: c,
        class: $(["dk-cascader", `dk-cascader--${e.size}`]),
        onMouseenter: b,
        onClick: te[2] || (te[2] = (ae) => H(ae, e.options)),
        onMousedown: te[3] || (te[3] = ce(() => {
        }, ["stop"]))
      }, [
        J(O.$slots, "default"),
        h("div", {
          class: $(["dk-cascader-content_box", [v.value ? "dk-cascader-content_box--show" : ""]]),
          onMouseenter: U,
          onMouseleave: xe,
          ref_key: "cascaderContentBoxRef",
          ref: k
        }, [
          C.value.length ? (n(), o("div", lo, A(C.value), 1)) : x("", !0),
          C.value.length == 0 ? (n(), o("div", to, A(e.placeholder), 1)) : x("", !0),
          h("div", ao, [
            $e.value ? (n(), o("span", {
              key: 0,
              onClick: _e,
              class: "dk-input__suffix-icon dk-input__select-icon"
            }, [
              R(ue, {
                class: "dk-select__icon",
                size: T.value,
                color: "rgba(0, 0, 0, 0.40)",
                name: "icon-clear"
              }, null, 8, ["size"])
            ])) : x("", !0),
            $e.value ? x("", !0) : (n(), o("span", {
              key: 1,
              onMousedown: te[0] || (te[0] = ce((...ae) => O.stopEvent && O.stopEvent(...ae), ["stop"])),
              class: $(["dk-input__suffix-icon dk-input__select-icon", v.value ? "dk-select__rotate" : ""])
            }, [
              R(ue, {
                class: "dk-select__icon",
                size: T.value,
                color: O.disabled ? "rgba(0, 0, 0, 0.26)" : v.value ? "#1E75FE" : "#00000066",
                name: "icon-chevron-down"
              }, null, 8, ["size", "color"])
            ], 34))
          ])
        ], 34),
        Ve(h("div", {
          ref: v.value ? (ae) => _(ae) : "",
          class: $(["dk-cascader-popup"])
        }, [
          (n(!0), o(Q, null, re(u.value, (ae, ne) => (n(), o(Q, { key: ne }, [
            ae.children && ae.children.length > 0 ? (n(), o("div", {
              key: 0,
              class: $(["dk-cascader-popup__content"], ne > 0 ? "dk-cascader__item--border" : ""),
              style: Z({
                minWidth: e.popupMinWidth,
                borderRadius: u.value.length > 1 ? "" : "6px"
              }),
              ref_for: !0,
              ref_key: "oppupRef",
              ref: r
            }, [
              (n(!0), o(Q, null, re(ae.children, (j, K) => (n(), o(Q, {
                key: j.value
              }, [
                h("div", {
                  class: $([
                    "dk-cascader__item",
                    V.value.indexOf(j.value) > -1 ? "iterm-light" : ""
                  ]),
                  onClick: ce((me) => f(j), ["stop"])
                }, [
                  h("div", so, A(j.label), 1),
                  j.children && j.children.length ? (n(), o("div", oo, [
                    R(ue, { name: "icon-arrow-right" })
                  ])) : x("", !0)
                ], 10, no),
                Ve(h("div", {
                  class: $(["dk-cascader-child__item", V.value.indexOf(j.value) > -1 ? "iterm-light" : ""]),
                  onClick: ce((me) => f(j), ["stop"]),
                  onMousedown: te[1] || (te[1] = ce(() => {
                  }, ["stop"]))
                }, null, 42, io), [
                  [Te, j.children && j.children.length > 0]
                ])
              ], 64))), 128))
            ], 6)) : x("", !0)
          ], 64))), 128))
        ], 512), [
          [Te, v.value]
        ])
      ], 34);
    };
  }
}), co = [
  Ll,
  Nl,
  Ol,
  qe,
  jl,
  Ul,
  nt,
  ut,
  ft,
  gt,
  yt,
  _t,
  wt,
  St,
  At,
  Pt,
  Ut,
  ma,
  za,
  Aa,
  Ka,
  Ua,
  Ga,
  Qa,
  Za,
  nn,
  sn,
  on,
  dn,
  hn,
  Nn,
  Tn,
  On,
  Kn,
  Un,
  Gn,
  is,
  Rs,
  Hs,
  Ks,
  eo,
  uo
], ro = (e, s) => {
  if (e.install = (l) => {
    for (const t of [e, ...Object.values(s ?? {})])
      l.component(t.name, t);
  }, s)
    for (const [l, t] of Object.entries(s))
      e[l] = t;
  return e;
}, vo = ["id"], fo = {
  key: 0,
  class: "dk-message-left"
}, ho = { class: "dk-message-con" }, po = { class: "dk-message-con--header" }, mo = { key: 0 }, go = {
  key: 0,
  class: "dk-message-con--footer"
}, ko = {
  class: /* @__PURE__ */ $(["dk-message-con--footer-overflow"])
}, yo = {
  key: 0,
  class: "dk-message-con--footerItem"
}, bo = { class: "dk-message-right" }, _o = /* @__PURE__ */ Object.assign({
  name: "DkMessage"
}, {
  __name: "message",
  props: {
    id: {
      type: String,
      default: ""
    },
    type: {
      type: String,
      default: "info"
    },
    title: {
      type: String,
      default: "这是一条信息普通信息提示!"
    },
    clearable: {
      type: Boolean,
      default: !1
    },
    customText: {
      type: String,
      default: null
    },
    opertext: {
      type: String,
      default: null
    },
    htmlContext: {
      type: String,
      default: null
    },
    Arraylist: {
      type: Array,
      default: []
    },
    handleAlertBound: {
      type: Function,
      default: () => {
      }
    },
    handleAlertClose: {
      type: Function,
      default: () => {
      }
    },
    icon: {
      type: Boolean,
      default: !0
    },
    minWidth: {
      type: Number,
      default: 0
    },
    defaultShowLine: {
      type: Number,
      default: 1
    }
  },
  setup(e, { expose: s }) {
    const l = i(!1), t = i(!0), a = e, v = () => {
      l.value = !l.value;
    }, c = () => {
      a.handleAlertClose();
    }, m = () => {
    }, d = () => {
      a.handleAlertBound();
    };
    return s({
      closeVisible: m
    }), (r, u) => {
      var b;
      return n(), o("div", {
        class: $(["dk-message", [
          a.type ? "dk-message--" + a.type.value : "",
          t.value ? "dk-message--animation-true" : "dk-message--animation-false"
        ]]),
        style: Z({ minWidth: a.minWidth.value + "px" }),
        id: a.id.value
      }, [
        a.icon.value ? (n(), o("div", fo, [
          R(qe, {
            name: a.icon.value && a.type.value ? "icon-" + a.type.value : ""
          }, null, 8, ["name"])
        ])) : x("", !0),
        h("div", ho, [
          h("div", po, [
            a.title.value ? (n(), o("span", mo, A(a.title.value), 1)) : x("", !0),
            a.opertext.value ? (n(), o("span", {
              key: 1,
              onClick: d,
              class: "opertext--style"
            }, A(a.opertext.value), 1)) : x("", !0)
          ]),
          ((b = r.Arraylist.value) == null ? void 0 : b.length) > 0 ? (n(), o("div", go, [
            h("div", ko, [
              r.Arraylist.value.length > 0 ? (n(), o("div", yo, [
                (n(!0), o(Q, null, re(r.Arraylist.value, (k, g) => (n(), o("div", {
                  class: "dk-message-con--footer--list",
                  key: g
                }, [
                  !l.value && g <= a.defaultShowLine.value - 1 ? (n(), o(Q, { key: 0 }, [
                    be(A(k), 1)
                  ], 64)) : x("", !0),
                  l.value ? (n(), o(Q, { key: 1 }, [
                    be(A(k), 1)
                  ], 64)) : x("", !0)
                ]))), 128))
              ])) : x("", !0)
            ]),
            h("div", {
              class: "dk-message-con--footer--list--visible",
              onClick: v
            }, [
              h("span", null, A(l.value ? "收起" : "展开更多"), 1)
            ])
          ])) : x("", !0)
        ]),
        h("div", bo, [
          a.clearable.value && !a.customText.value ? (n(), o("div", {
            key: 0,
            class: "dk-message-rightIcon",
            onClick: c
          }, [
            R(qe, { name: "icon-close" })
          ])) : x("", !0),
          a.clearable.value && a.customText.value ? (n(), o("div", {
            key: 1,
            class: "dk-message-rightText",
            onClick: c
          }, A(a.customText.value), 1)) : x("", !0)
        ])
      ], 14, vo);
    };
  }
}), xo = /* @__PURE__ */ Ke(_o, [["__scopeId", "data-v-ec21cb99"]]);
let wo = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((s, l) => (l &= 63, l < 36 ? s += l.toString(36) : l < 62 ? s += (l - 26).toString(36).toUpperCase() : l > 62 ? s += "-" : s += "_", s), "");
const kl = i(""), Ze = i(""), el = i(!1), ll = i(null), tl = i(null), al = i(null), nl = i([]), yl = i(!0), bl = i(0), _l = i(1), sl = i(""), ol = i(null);
let $o = () => {
  ol.value.handleBound();
}, Co = () => {
  ol.value.handleClose(), il();
};
const Ue = Dl(xo, { type: kl, title: Ze, clearable: el, customText: ll, opertext: tl, htmlContext: al, Arraylist: nl, id: sl, icon: yl, minWidth: bl, defaultShowLine: _l, handleAlertBound: $o, handleAlertClose: Co }).mount(document.createElement("div"));
let xl = (e) => {
  ol.value = e, kl.value = e.type, Ze.value = e.title, yl.value = e.icon, el.value = e.clearable, ll.value = e.customText, tl.value = e.opertext, al.value = e.htmlContext, nl.value = e.Arraylist, bl.value = e.minWidth, _l.value = e.defaultShowLine ? e.defaultShowLine : 1, sl.value = wo(), document.body.appendChild(Ue.$el);
}, il = () => {
  Ze.value = "", el.value = "", ll.value = "", tl.value = "", al.value = null, nl.value = "", Ue.closeVisible(sl.value), document.body.removeChild(Ue.$el);
}, So = (e, s = 2e3) => {
  xl(e), setTimeout(() => {
    il();
  }, s);
};
const Mo = {
  show: xl,
  hide: il,
  auto: So
}, pl = Symbol("INSTALLED_KEY"), Vo = (e) => ({
  install: (l) => {
    l[pl] || (l[pl] = !0, e.forEach((t) => {
      const a = ro(t);
      l.use(a);
    }));
  }
}), Do = Vo([...co]);
export {
  Mo as D,
  Ke as _,
  Do as e,
  Vo as m
};
